Open Dirt-Nasty opened 2 years ago
@Dirt-Nasty That is because NEAR Protocol by design operates with byte-array inputs/outputs, and it is up to contract developers to define the serialization/deserialization and it just happens that most of the contracts use JSON. You are welcome to contribute the support for custom serialization/deserialization for view_call
method.
Any reason why view_call response is not returning the byte array decoded? Just want to make sure I'm not setting myself up for disaster down the road. I been using
json.loads("".join(map(chr, bytes_data)))
and it seems to be working well but not sure if that is the most efficient way.