Package cc.plural.jsonij.marshal.codec

Examples of cc.plural.jsonij.marshal.codec.JSONValueCodecStore$JSONValueCodecHelper


        }
    }

    public static void registerCodec(Class<?> type, Class<? extends JSONValueCodec> codec) {
        if (CODEC_STORE == null) {
            CODEC_STORE = new JSONValueCodecStore();
        }
        CODEC_STORE.registerCodec(type, codec);
    }
View Full Code Here


    @Test
    public void testCodecStoreRegister() throws JSONMarshalerException, IOException, ParserException {
        System.out.println("testCodecStoreRegister");

        JSONValueCodecStore codecStore = new JSONValueCodecStore();

        assertFalse(codecStore.hasCodec(Date.class));

        codecStore.registerCodec(Date.class, DateJSONValueCodec.class);

        assertTrue(codecStore.hasCodec(Date.class));
    }
View Full Code Here

    @Test
    public void testCodecStoreRegisterParent() throws JSONMarshalerException, IOException, ParserException {
        System.out.println("testCodecStoreRegisterParent");

        JSONValueCodecStore codecStore = new JSONValueCodecStore();

        assertFalse(codecStore.hasCodec(Date.class));

        codecStore.registerCodec(Date.class, DateJSONValueCodec.class);

        assertTrue(codecStore.hasCodec(InternalDate.class));
    }
View Full Code Here

TOP

Related Classes of cc.plural.jsonij.marshal.codec.JSONValueCodecStore$JSONValueCodecHelper

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.