Skip to content

icoloma/jackson4gae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jackson4GAE

Jackson4GAE is a Java library of Jackson serializers and deserializers for common Google AppEngine data types.

Your class can be serialized as JSON including GAE-specific classes:

{
   key: "Invoice(23)",
   geopt: { lat: 0.345, lng: 0.123 },
   cursor: "E-ABAIICHmoRamFja3NvbjRnYWUtdGVzdHNyCQsSA2ZvbxgBDBQ"
}

Currently the library supports Key, BlobKey, Text, GeoPt, Cursor and Search Cursors.

Class Serialized as Example
Key Key.getKind() +
{ Key.getId() or Key.getName() }
"Invoice(20)"
"User('icoloma')"
BlobKey BlobKey.getKeyString() "H9gv9XtAEst7S9JaBoyDmA"
Text Text.getValue() "foobar"
GeoPt Json object with lat and lng { lat: 0.234, lng: 0.345 }
Cursor Cursor.toWebSafeString() "E-ABAIICHmoRamFja3NvbjRnYWUtdGVzdHNyCQsSA2ZvbxgBDBQ"
Search cursor Cursor.toWebSafeString() "E-ABAIICHmoRamFja3NvbjRnYWUtdGVzdHNyCQsSA2ZvbxgBDBQ"

Analytics

Maven

Include this in your pom.xml:

<dependency>
   <groupId>org.extrema-sistemas</groupId>
   <artifactId>jackson4gae</artifactId>
</dependency>

Initialization

To use, just add the following to your ObjectMapper initialization code:

objectMapper.registerModule(new GaeJacksonModule());

ObjectMapper is not cheap to initialize, so you should keep the instance as a singleton somewhere, preferably in your Dependency Injection configuration.

About

Jackson4GAE is a collection of Jackson serializers and deserializers of common Google AppEngine data types.

Resources

Stars

Watchers

Forks

Packages

No packages published