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

Embedded arrays, objects #19

Closed
jpmens opened this Issue Mar 9, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@jpmens
Owner

jpmens commented Mar 9, 2016

Just playing around, but I'd like some feedback (cc: @itchyny) Is this a good idea?

creates an array: name[]
creates an object: name[member]

jo -p number=17 pass=true geo[lon]=88 geo[cc]=ES point[]=1 point[]=2 geo[lat]=123.45 geo[ok]=false
{
   "number": 17,
   "pass": true,
   "geo": {
      "lon": 88,
      "cc": "ES",
      "lat": 123.45,
      "ok": false
   },
   "point": [
      1,
      2
   ]
}

@jpmens jpmens added the enhancement label Mar 9, 2016

@jpmens jpmens changed the title from Is this a good idea? to Embedded arrays, objects Mar 9, 2016

@tiptronic

This comment has been minimized.

Show comment
Hide comment
@tiptronic

tiptronic Mar 9, 2016

I like it!!

tiptronic commented Mar 9, 2016

I like it!!

@phanimahesh

This comment has been minimized.

Show comment
Hide comment
@phanimahesh

phanimahesh Mar 9, 2016

👍 This is a very common format, for instance url query parameters in many web frameworks are interpreted this way.

phanimahesh commented Mar 9, 2016

👍 This is a very common format, for instance url query parameters in many web frameworks are interpreted this way.

jpmens pushed a commit that referenced this issue Mar 9, 2016

@jpmens

This comment has been minimized.

Show comment
Hide comment
@jpmens

jpmens Mar 10, 2016

Owner

Implemented in 0.8

Owner

jpmens commented Mar 10, 2016

Implemented in 0.8

@jpmens jpmens closed this Mar 10, 2016

jpmens pushed a commit that referenced this issue Mar 10, 2016

Jan-Piet Mens
unset JO_PRETTY
  hoisted by my own petard (as itchyny warned in #19 ;-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment