Package com.github.jsonj

Examples of com.github.jsonj.JsonArray


                {object().put("a", array("1","2")).get()},
                {object().put("a", array("1","2")).put("b","c").get()},
                {object().put("b","c").put("a", array("1","2")).get()},
                {object().put("b","c").put("a", array("1","2")).put("c", object().get()).get()},
                {object().get()},
                {new JsonArray()},
                {primitive(true)},
                {primitive(false)},
                {primitive(42)},
                {primitive(42.0)},
                {primitive("foo")},
View Full Code Here


    public void shouldSwapPoint() {
        assertThat(swapLatLon(toJsonJPoint(point1)), is(array(2.0,1.0)));
    }

    public void shouldConvertLineString() {
        JsonArray ls = toJsonJLineString(lineString1);
        assertThat(ls.first().asArray(), is(toJsonJPoint(point1)));
        assertThat(ls.last().asArray(), is(toJsonJPoint(point3)));
    }
View Full Code Here

        assertThat(ls.first().asArray(), is(toJsonJPoint(point1)));
        assertThat(ls.last().asArray(), is(toJsonJPoint(point3)));
    }

    public void shouldSwapPoints() {
        JsonArray ls = toJsonJLineString(lineString1);
        JsonArray swapped = swapLatLon(ls);
        assertThat(swapped.first().asArray(), is(array(2.0,1.0)));
    }
View Full Code Here

        JsonArray swapped = swapLatLon(ls);
        assertThat(swapped.first().asArray(), is(array(2.0,1.0)));
    }

    public void shouldConvertLineStringToPolygon() {
        JsonArray polygon = GeoJsonSupport.lineStringToPolygon(lineString1);
        assertThat(polygon.first().asArray().last().asArray(), is(toJsonJPoint(point1)));
    }
View Full Code Here

TOP

Related Classes of com.github.jsonj.JsonArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.