-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JsonPath setting by path and JSON facade #1
Conversation
Hi, As you say it's a big change and it will break the projects where I use JsonPath today. I will definitely pick parts of your code when I find the time. Thank you for your input (and effort), it's appreciated! Best regards On Jul 29, 2011, at 11:24 PM, davefb wrote:
|
|
||
</dependencies> | ||
</project> | ||
<?xml version="1.0"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not totally sure what we are doing here with these mass removals and additions. They look like copy paste.
This is to old now. |
… Configuration Option CREATE_MISSING_PROPERTIES_ON_DEFINITE_PATH needs to be set to enable this feature. Without this Option a Jsonpath.set() on a non-existent path would throw com.jayway.jsonpath.PathNotFoundException. 2. JSON -TO- JSON transformation : A new API and SPI (TransformationProvider) has been introduced to support JSON to JSON transformation specified using Source and Target JsonPath's. This feature makes use of #1 above to create/add the required attributes to the transformed target JSON. 3. As is the norm in JsonPath Framework, there can be several implementations of the TransformationProvider. This commit defines a particular Provider with its own JsonPath based TransformationSpec. The Spec allows for WildCard mappings (currently Single-Level) for array paths. It provides a notion of LookupTables that support custom mapping of a string/enumeration value in the source document to a value in the corresponding transformed target document. 4. Changes made to Configuration and Option classes to introduce this new Optional TransformationProvider API. 5. DefaultsImpl updated to provide a default instance of the transformationProvider implementation. 6. Changes to internal classes PathRef, PathToken and PropertyPathToken mainly to support #1 above. 7. New API added to AbstractJsonProvider, addArrayIndex to support #1 above. 8. New Files and Classes : API and SPI classes for TransformationProvider and TransformationSpec. 9. As an API the TransformationSpec provides the ability to get the spec as an opaque object and also one could validate the spec object. 10. Each implementation of the TransformationProvider can have its own TransformationSpec definition.
Update from json-path/JsonPath
I did some feature enhancements to jsonpath as part of a project I'm working on. it's a pretty large change so you might not want to accept it wholesale, but feel free to take a look and use anything that might be useful to you. There are notes in the README.