cloudendpoints / endpoints-java

A Java framework for building RESTful APIs on Google App Engine
Apache License 2.0
32 stars 35 forks source link

Feature request: turn off pretty-printing of JSON server-side #44

Open charlescapps opened 7 years ago

charlescapps commented 7 years ago

Currently in order to turn off pretty printing JSON responses, we must add the query param "prettyPrint=false" to every single request made to a Cloud Endpoints API. It would be much preferred if we could turn this off by default on the server, so that if no "prettyPrint" query param is provided, pretty printing is off.

This might seem inconsequential, but we send fairly large payloads (2MB and up) that must be performant on low-end Android devices, and turning off pretty printing reduces the payloads by 15-20%, which results in reduced deserialization costs for all RPCs to all of our services.

Thanks for considering this feature. Maybe if I can find the free cycles I'll work on it myself.

tangiel commented 7 years ago

This is being fixed in #84. Thanks for your patience.