We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please review the following results when quoting path expressions that may or may not include namespace notation. Test #5 shows the expected results. It would be nice if #3 or #4 produced the same results, but I'm not sure what the SOT path spec says about pseudo namespaces. I was hoping that quoted or escaped path notation from via the root SO would work. --- 1 str := '{ "ns_h": [ { "color": "red" }, { "color": "blue" } ] }'; resp := SO(str); iso := resp['ns_h']; iso.AsString => [{"color":"red"},{"color":"blue"}] --- 2 str := '{ "ns_h": [ { "color": "red" }, { "color": "blue" } ] }'; resp := SO(str); iso := resp['"ns_h"']; iso.AsString => ns_h --- 3 str := '{ "ns:h": [ { "color": "red" }, { "color": "blue" } ] }'; resp := SO(str); iso := resp['"ns:h"']; iso.AsString => ns:h --- 4 str := '{ "ns:h": [ { "color": "red" }, { "color": "blue" } ] }'; resp := SO(str); iso := resp['ns:h']; iso => nil --- 5 str := '{ "ns:h": [ { "color": "red" }, { "color": "blue" } ] }'; resp := SO(str); iso := resp.AsObject['ns:h']; iso.AsString => [{"color":"red"},{"color":"blue"}] --- 6 str := '{ "ns:h": [ { "color": "red" }, { "color": "blue" } ] }'; resp := SO(str); iso := resp.AsObject['"ns:h"']; iso => nil --- 7 str := '{ "ns:h": [ { "color": "red" }, { "color": "blue" } ] }'; resp := SO(str); iso := resp['ns:h[0].color']; iso => nil --- 8 str := '{ "ns_h": [ { "color": "red" }, { "color": "blue" } ] }'; resp := SO(str); iso := resp['ns_h[0].color']; iso.AsString => red --- 9 str := '{ "ns:h": [ { "color": "red" }, { "color": "blue" } ] }'; resp := SO(str); iso := resp['ns\:h']; iso => nil --- 10 str := '{ "ns\:h": [ { "color": "red" }, { "color": "blue" } ] }'; resp := SO(str); iso := resp['ns\:h']; iso => nil --- 11 str := '{ "ns\:h": [ { "color": "red" }, { "color": "blue" } ] }'; resp := SO(str); iso := resp['ns:h']; iso => nil
Original issue reported on code.google.com by [email protected] on 8 Mar 2010 at 4:35
[email protected]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Original issue reported on code.google.com by
[email protected]
on 8 Mar 2010 at 4:35The text was updated successfully, but these errors were encountered: