Search in sources :

Example 1 with JSONLDEntityDecoder

use of org.whole.lang.json.util.JSONLDEntityDecoder in project whole by wholeplatform.

the class JSONLDPersistenceKit method doReadModel.

protected IEntity doReadModel(IPersistenceProvider pp) throws Exception {
    JsonFactory factory = new JsonFactory();
    JsonParser parser = factory.createParser(pp.getInputStream());
    parser.disable(Feature.AUTO_CLOSE_SOURCE);
    try {
        return new JSONLDEntityDecoder().clone(new JSONParserTemplateFactory(parser).create());
    } finally {
        parser.close();
    }
}
Also used : JSONLDEntityDecoder(org.whole.lang.json.util.JSONLDEntityDecoder) JsonFactory(com.fasterxml.jackson.core.JsonFactory) JSONParserTemplateFactory(org.whole.lang.json.util.JSONParserTemplateFactory) JsonParser(com.fasterxml.jackson.core.JsonParser)

Aggregations

JsonFactory (com.fasterxml.jackson.core.JsonFactory)1 JsonParser (com.fasterxml.jackson.core.JsonParser)1 JSONLDEntityDecoder (org.whole.lang.json.util.JSONLDEntityDecoder)1 JSONParserTemplateFactory (org.whole.lang.json.util.JSONParserTemplateFactory)1