Example of using json-ld from Java

Question also sent to IRC channel:
Hi, is there someone who can help me with parsing json-d from Java? I see
that from javascript it's relatively easy to traverse the json-ld
structure, see this example:
http://www.autoidlabs.org.uk/GS1Digital/Demos/GS1vocab/gs1JSON-LD-with-JavaScript.html.
But I'm always ending up casting to several layers of LinkedHashMap to get
to the data I want to use/test. Am I modelling things wrong or using
Expansion/Compaction/Flattening/Framing in a way that makes me end up with
all these LinkedHashMaps I need to "unpack" to get to the level in the
json-ld structure I want to read?
This is an example where I've tried to fetch an attribute from a json-ld
structure from java, and I used flatten algorithm first (even not sure if
that is best practise), and as you can see it's not as elegant as done in
Javascript :( http://pastie.org/10727293

Regards,
Viggo Navarsete

Received on Friday, 19 February 2016 10:35:14 UTC