[ { "var": ["myVariable1","myVariable2"], "key1": 123123, "key2": 1122, "key3": "abcd-0101" }, { "var": ["myVariable1"], "key1": 123124, "key2": 1123, "key3": "abcd-0102" }, ]
{
list: [ { "var": ["myVariable1","myVariable2"], "key1": 123123, "key2": 1122, "key3": "abcd-0101" }, { "var": ["myVariable1"], "key1": 123124, "key2": 1123, "key3": "abcd-0102" }, ]
}
David,
Thank you for your very prompt reply! I am required (for
compatibility) to use version 2.6.0. I'm not sure this makes much
of a difference. What I am attempting to ultimately accomplish is
turn the .proto files into code I can feed into the PowerPC cross
compiler to generate code as part of the static image to load onto
the PowerPC. Perhaps I'm not thinking about this process in the
correct manner. If I generate Protoc using that cross compiler,
Protoc will have to be run on the PowerPC? If so, my goal is
defeated. I don't think, however, that running the x86 Protoc will
give me the correct data structures and code. Perhaps I'm
completely backwards.
Kerry
The fundamental unit for protobufs (across all serialization and presentation formats, including JSON) is a message.
The semantics of the general JSON format do not map to protobuf semantics very well, but the proto3 language guide has a section on the JSON structures that can interoperate with protobufs:
https://developers.google.com/protocol-buffers/docs/proto3#json
The impetus for JSON interop is for servers which can understand either JSON- or wire-formatted requests, so a top-level list would pretty fundamentally break semantics. Given that pitfall, it's pretty unlikely that we would add support for anything other than a top-level message. The example you gave is how I would recommend representing "just" a list.
On Wednesday, April 22, 2020 at 5:18:24 PM UTC-7, Guilherme Costa wrote:
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/8a095f8d-a572-41fb-8fb7-72de6208874e%40googlegroups.com.