Android-Utility
Reference:
Jackson & GSON
JSON Example with Jackson
###Jackson Json Processor
- Jackson Json Processor
- Installation in Gradle:
compile ([group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.4.3'],
[group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.4.3'],
[group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.4.3'])
- JSON -> Get Specific Value Usage:
- Object -> JSON Usage:
ObjectMapper mapper = new ObjectMapper();
try {
tempString = mapper.writeValueAsString(mAddress); }
catch (JsonGenerationException e) { e.printStackTrace(); } catch (JsonMappingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); }
####GSON
- GSON
- Installation in Gradle:
compile 'com.google.code.gson:gson:x.x.x'