Skip to content
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

add a new way to access Json #117

Closed
wants to merge 4 commits into from
Closed

add a new way to access Json #117

wants to merge 4 commits into from

Conversation

H20Zhang
Copy link

Now
you can use :

let value = json["1/2/3/who"]

I'm new to github,fist time to send a pull request,LOL

zhanghao added 4 commits December 17, 2014 22:28
Now you can access Json property as
let name = json["1/23/12/who"].string
@LukeTangPL
Copy link
Member

@zhanghao111111111 thanks, but "1/2/3/who" is not a appropriate syntax. Please try json["1","2","3","who"]

@LukeTangPL LukeTangPL closed this Dec 23, 2014
@H20Zhang
Copy link
Author

my pleasure ,hope to contribute

在 2014年12月23日,上午10:02,tangplin notifications@github.com 写道:

@zhanghao111111111 https://github.com/zhanghao111111111 thanks, but "1/2/3/who" is not a appropriate syntax.


Reply to this email directly or view it on GitHub #117 (comment).

@brigand
Copy link

brigand commented Dec 23, 2014

Possibly outside the scope of this package, but JSONPath is relevant here. about

There are implementations at least in Java and JavaScript.

For example, with api.github/repos/../SwiftyJSON/issues you could get an array of the comments url using $.. comments_url to get an array of comment urls, or $..[?(@staus=open)] to get comments where the status is open. The benefit of this being the safety provided by SwiftyJSON.

Just an idea, it's probably outside the scope, and would be better suited to an extension library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants