[JSON_PROCESSING_SPEC-35] Add ability to read/writer numeric types as String Created: 07/Dec/12  Updated: 12/Dec/12  Resolved: 12/Dec/12

Status: Resolved
Project: json-processing-spec
Component/s: None
Affects Version/s: 1.0-pr
Fix Version/s: 1.0-pr

Type: Improvement Priority: Major
Reporter: blaise_doughan Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Allow Strings to be written to and read from JSON numeric types.

Relevant Use Cases:

  • Ensure I can get a value represented as 1.23e10 (JSON allows this representation)
  • If I have a form that is being using to collection data, this data can be written to JSON without first having to convert it to a numeric type.
  • Make it easier to port data from XML to JSON, again no need to first convert it to a numeric type.


 Comments   
Comment by jitu [ 07/Dec/12 ]

Suggest the following methods in JsonGenerator.

JsonGenerator writeNumber(String name, String number)
JsonGenerator writeNumber(String number)

The number string value needs to be validated as per JSON grammar.

Comment by jitu [ 12/Dec/12 ]

http://java.net/projects/json-processing-spec/lists/users/archive/2012-12/message/46

Based on the discussion, resolving with no action.

Generated at Fri Jan 20 14:35:13 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.