I'm using the objective-c version Protobufs.
I have a .proto defined as
message RangeData {
int32 rows = 1;
int32 columns = 2;
bytes data = 3;
}
The server-side has been developed in C#/.Net. I'm able to successfully
send/receive and unpack the data from the 'data' field 3 above. In the c#
port, 'bytes' are represented by a Google protobufs "ByteString" object.
In objective-c, they're represented as NSData instance.
I am currently taking a object array in C# and packing that into the
ByteString. I have a separate .Net WPF client that successfully retrieves
the data from the ByteString instance.
The object array is essentially a two-dimensional (object[,]) array
instance whose elements can be numeric, or strings of varying length.
ary[0, 0] = ""
ary[0, 1] = "Jan 2010"
ary[0, 2] = "Feb 2010"
...
ary[0, 13] = "- Year 2010"
ary[1, 0] = 89544.994
ary[1, 1] = 93202.257
...
ary[1, 13] = 492331.908
ary[2, 0] = "Report A"
...
ary[16, 13] = ...
The number of rows and columns for this two dimensional array are passed in
an outer (Message) context.
What is the technique for dealing with the NSData and extracting & parsing
back into an objective-c (or Swift) arrays?
Are there helper classes I should be aware of to help in these scenarios?
Thanks
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.