Closed richard-jones closed 8 years ago
t.execute("$.'dc:identifier'") should solve that. :)
Greetings, Adrian Kalbarczyk
http://kalbarczyk.co http://about.me/akalbarczyk
On Wed, Feb 10, 2016 at 6:22 PM, Richard Jones notifications@github.com wrote:
I have a JSON-LD style document that contains ":" as a namespace separator in the object's keys, so something like:
{ "dc:identifier" : [{"type" : "identifier type", "id" : "identifier"}] }
When I do
t = Tree(doc) t.execute("$.dc:identifier")
I get nothing back.
If I add a key which does not have a ":" it works fine, so I guess that's the reason.
I couldn't see if ":" is a special character in objectpath, and I couldn't find an escape character to use from the documentation, so a bit stuck. A shame, as it does everything else I need!
— Reply to this email directly or view it on GitHub https://github.com/adriank/ObjectPath/issues/42.
Excellent! Works nicely, thank you :)
I have a JSON-LD style document that contains ":" as a namespace separator in the object's keys, so something like:
When I do
I get nothing back.
If I add a key which does not have a ":" it works fine, so I guess that's the reason.
I couldn't see if ":" is a special character in objectpath, and I couldn't find an escape character to use from the documentation, so a bit stuck. A shame, as it does everything else I need!