Prefixes and the use of ':'

I am trying to use JSON-LD for exchanging some content and I need to be
able to express namespaces.
I was looking at example 33 in the spec:

If I use something like this

I cannot access the value of that key - for instance in Grails/Groovy or
JavaScript - with something like:

In Grails/Groovy I have to change it into something like
((JSONObject) myobject).get("foaf:age");

I was therefore wondering if you have any recommendations/preferred
approach for dealing with prefixes.
I thought of just substituting the ':' with the '_' and then map all the
properties singularly in the context but it looks verbose and not elegant.

Thank you,

Received on Friday, 21 September 2012 14:13:21 UTC