Comments (5)
Edited the issue to be about PUBLIC_FIELDS, which it actually is about, rather than CUSTOM_FIELDS, which I selected as a "better example" for no particularly good reason. :)
from json-io.
There is a new 'optionalArg' Map for the public JsonWriter APIs. What this allows, is for new functionality to be added, without changing the JsonWriter's API.
Currently, you can set the key 'DATE_FORMAT' (JsonWriter.DATE_FORMAT) and then set the value of it to a date format String. If this is found, this will be used to write out java.util.Dates.
Also, you can set the value JsonWriter.TYPE to 'true' and it will force @type's to be written out (not recommended, as it will significantly increase the size of the JSON stream). This was added for the rare case where the recipient needs all @type information but cannot infer it (rare occurrence - it was a JBoss rule engine user).
In the future, other such 'hints' will be added to JsonWriter as required. In those cases, JsonWriter will have a public String final key that can be used to place the value into the optionalArgs Map. If you look at the internal _args member variable, and where that is accessed, that is where JsonWriter takes into account the values set into this optionalArgs map.
from json-io.
Please consider amending the javadoc to not mention FieldGrabber
or PUBLIC_FIELDS
, etc, since they aren't implemented! :) ...Or please double check that you haven't left some commits out of trunk?
from json-io.
Dave,
Now I see what you were talking about. I think I misunderstood your
question. I got ahead of myself on a comment and have yet to check in the
work (field filtering) that I mention in the comment. I will remove that
from the comment for now.
Field fitlering is coming soon. PUBLIC, ALL_BUT_TRANSIENT, ALL, and a
FieldFilter that you write and associate to a class, allowing your class to
selectively decide what fields get serialized. This will be pretty easy to
implement and further increases json-io's power.
Best regards,
John
On Tue, Dec 31, 2013 at 2:29 PM, Dave Loyall [email protected]:
Please consider amending the javadoc to not mention FieldGrabber or
PUBLIC_FIELDS, etc, since they aren't implemented! :) ...Or please double
check that you haven't left some commits out of trunk?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-31407928
.
from json-io.
Sounds great, thank you!
from json-io.
Related Issues (20)
- Exception while deserializing `SingletonList` HOT 1
- Incorrect looking tag "14.4.2" for release version 4.14.2 HOT 1
- Possible issue about list of objects that have custom writers HOT 5
- Java class version 55 for 4.14.2 HOT 3
- Revisiting issue 17 HOT 6
- Enums are serialized differently with 4.15.0 HOT 3
- 4.15 --> 4.16 default mapping method fails to parse HOT 7
- Enhance the robustness of tests
- ReadOptionsBuilder HOT 1
- Compile / runtime dependency on com.novell.ldap:jldap HOT 3
- How to deserialise javafx classes with inaccessible fields? HOT 2
- Request for tutorial HOT 2
- NoSuchMethodError after upgrade HOT 24
- Custom serialising of objects with inheritance HOT 2
- Encoding Bug for JsonIo.toJson("🙊🙉🙈", null)? HOT 3
- Custom Writers not including id and ref in output? HOT 3
- Compatibility between 4.14.0 and 4.20.0 HOT 4
- User guide Untyped Usage HOT 1
- high usage of metaspace after upgrade to 4.22.0 HOT 4
- memory leak on LRUCache HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-io.