Question

The URL https://www.googleapis.com/freebase/v1/topic/en/alps returns a JSON string that is nicely formatted for reading. How can I tell Freebase to return the raw JSON string without all the unnecessary characters?

Was it helpful?

Solution

You can make the API request with GZIP enabled which will get rid of ALL the unnecessary bytes.

Accept-Encoding: gzip

You can also use the filter parameter to only return the property values that your app needs.

OTHER TIPS

I don't think you can, but it shouldn't make a difference to any JSON parser. The whitespace isn't significant.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top