vendredi 2 janvier 2015

JSONPath resolver for Java objects

Is there a library to get a value from an Java object instead from a JSON string by applying a JSONPath expression?


The reason is that my Java object is created from a JSON string (via Jackson). The initial JSON contains some JSONPath expressions I want to resolve. They are reflected by simple Integers, Booleans, Strings and other types in my Jackson annotated class.


Problems:



  • I DON'T have access to the previous JSON string and a serialization would be to high in cost.

  • Even if I would parse the previous JSON the result is a JSON string and not the Java object I need (I further don't know its class to call Jacksons unmarshaller on that JSON string).






Aucun commentaire:

Enregistrer un commentaire