java - Get specific text from huge string -
i'm calling api , getting huge string of text (thousands of words in cases).
all want thumbnail_url.
here's sample:
"thumbnail_url": "http://ecx.images-amazon.com/images/i/4171sq7vc4l.jpg", "type": "rich", "thumbnail_height": 379
so want http://ecx.images-amazon.com/images/i/4171sq7vc4l.jpg example. idea?
edit - thumnail_url in middle of big block of text, need search "thumbnail_url" or something, right?
what can use external json library such gson - think google or this fine
and use in such way :
jsonobject json = (jsonobject)new jsonparser().parse(yourstring); system.out.println("url=" + json.get("thumbnail_url"));
Comments
Post a Comment