Transferring a group of items from the Google App Engine (Java) to JavaScript via Google Cloud Endpoints.
Item
:
public class Item implements Serializable {
private String item1;
private Integer item2;
private String item3;
//(...) item (4-39)
private String item40;
//Constructor, Getters, setters, +functions
}
When receiving data in JavaScript, each Item has this structure:
{item1:"v1",item2:"v2"}
However, there seems to be extra data attached to each object that is unclear why it is being sent.
The '?' data appears to be related to Serializable object functions, though the reason for its inclusion is puzzling.
To minimize data size, I aim to send data in the format: {"v1","v2"}
instead of
{item1:"v1",item2:"v2", a lot of functions}
.
One potential solution could be sending the data as a List<String>
in Java. However, this might prove challenging due to certain properties of the Item
object being structured objects.
Is there a method within Google Cloud Endpoints to achieve this type of data transmission?
Are there ways to configure endpoints to only transmit essential data?