Package com.github.jsonj

Examples of com.github.jsonj.JsonSet


    /**
     * @param elements {@link Number} instances
     * @return json array
     */
    public static JsonSet set(final Number... elements) {
        JsonSet jjArray = new JsonSet();
        for (Number n : elements) {
            jjArray.add(primitive(n));
        }
        return jjArray;
    }
View Full Code Here


    public void shouldConvertPrimitiveProperlyOnFromObject() {
        assertThat(fromObject(primitive("42")), is((JsonElement)primitive("42")));
    }

    public void shouldCreateSet() {
        JsonSet set = set(1,2,3);
        assertThat(set, is(new JsonSet(Arrays.asList(1,2,3))));
        assertThat(set.size(), is(3));
    }
View Full Code Here

TOP

Related Classes of com.github.jsonj.JsonSet

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.