Java Code Examples for org.codehaus.jackson.JsonParser#setCodec()
The following examples show how to use
org.codehaus.jackson.JsonParser#setCodec() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: incubator-gobblin File: FieldAttributeBasedDeltaFieldsProvider.java License: Apache License 2.0 | 5 votes |
private ObjectNode getDeltaPropValue(String json) { try { JsonFactory jf = new JsonFactory(); JsonParser jp = jf.createJsonParser(json); ObjectMapper objMap = new ObjectMapper(jf); jp.setCodec(objMap); return (ObjectNode) jp.readValueAsTree(); } catch (IOException e) { return null; } }
Example 2
Source Project: usergrid File: ImportServiceImpl.java License: Apache License 2.0 | 4 votes |
/** * Gets the JSON parser for given file * * @param collectionFile the file for which JSON parser is required */ private JsonParser getJsonParserForFile(File collectionFile) throws Exception { JsonParser jp = jsonFactory.createJsonParser(collectionFile); jp.setCodec(new ObjectMapper()); return jp; }
Example 3
Source Project: usergrid File: ImportAdmins.java License: Apache License 2.0 | 4 votes |
private JsonParser getJsonParserForFile(File organizationFile) throws Exception { JsonParser jp = jsonFactory.createJsonParser( organizationFile ); jp.setCodec( new ObjectMapper() ); return jp; }
Example 4
Source Project: usergrid File: Import.java License: Apache License 2.0 | 4 votes |
private JsonParser getJsonParserForFile( File organizationFile ) throws Exception { JsonParser jp = jsonFactory.createJsonParser( organizationFile ); jp.setCodec( new ObjectMapper() ); return jp; }