jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Jackson JSON Processor
  • JACKSON-69

Support parsing non-standard JSON where Object keys are not quoted

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.9.4, 0.9.5, 1.0.0, 1.1
  • Fix Version/s: 1.2
  • Component/s: None
  • Labels:
    None

Description

For some use cases it would be beneficial to allow parsing of non-standard Json content, where Object field/key names are not quoted (are not surrounded by double
quotes). White space or colon then indicate where the key ends.

Benefits include interoperability (some systems assume that keys need not be quoted, since javascript does not require this) and slightly less verbose content.

Benefit:
1. 5% - 35% space saving
2. Might improve parse speed

Example 1
99 byte, {"name":"John","age":30,"status":2,"email":"john_marcus@gmail.com","hobbies":"football,basketball"}
90 byte, {name:"John",age:30,status:2,email:"john_marcus@gmail.com",hobbies:"football,basketball"}

Example 2
51 byte, {"Mo":1,"Tu":2,"We":3,"Th":4,"Fr":5,"Sa":6,"Su":7}
37 byte, {Mo:1,Tu:2,We:3,Th:4,Fr:5,Sa:6,Su:7}

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Tatu Saloranta added a comment - 14/Mar/09 12:26 AM

I don't have immediate plans working on this, but I realized that there might not be drastic performance problems. This because parsing can branch of immediately when no double-quote is encountered where a Map entry name is expected. This allows for isolation of handling of this case, if it is to be implemented.

Show
Tatu Saloranta added a comment - 14/Mar/09 12:26 AM I don't have immediate plans working on this, but I realized that there might not be drastic performance problems. This because parsing can branch of immediately when no double-quote is encountered where a Map entry name is expected. This allows for isolation of handling of this case, if it is to be implemented.
Hide
Permalink
Tatu Saloranta added a comment - 26/Mar/09 4:46 PM

Modifying title a bit, adding couple of more comments (from earlier discussions)

Show
Tatu Saloranta added a comment - 26/Mar/09 4:46 PM Modifying title a bit, adding couple of more comments (from earlier discussions)
Hide
Permalink
Tatu Saloranta added a comment - 27/Jul/09 1:02 AM

Will try to get this in 1.2, if time allows (if not, will be in 1.3)

Show
Tatu Saloranta added a comment - 27/Jul/09 1:02 AM Will try to get this in 1.2, if time allows (if not, will be in 1.3)
Hide
Permalink
Tatu Saloranta added a comment - 30/Jul/09 11:19 PM

Started working on this, should make it in 1.2 (last feature to add!)

Show
Tatu Saloranta added a comment - 30/Jul/09 11:19 PM Started working on this, should make it in 1.2 (last feature to add!)
Hide
Permalink
Tatu Saloranta added a comment - 03/Aug/09 10:44 PM

Included in 1.2.0 release.

Show
Tatu Saloranta added a comment - 03/Aug/09 10:44 PM Included in 1.2.0 release.
Hide
Permalink
Shay Banon added a comment - 04/Aug/09 2:31 AM

A quick question on this one, will the ability to produce JSON output can also be turned on to not produce quoted keys?

Show
Shay Banon added a comment - 04/Aug/09 2:31 AM A quick question on this one, will the ability to produce JSON output can also be turned on to not produce quoted keys?

People

  • Assignee:
    Tatu Saloranta
    Reporter:
    jimingliu
Vote (2)
Watch (3)

Dates

  • Created:
    04/Mar/09 8:22 PM
    Updated:
    04/Aug/09 2:31 AM
    Resolved:
    03/Aug/09 10:44 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.