Closed aananthram closed 4 years ago
I have not tried transcode
. I'm not super familiar with it, but would that actually serialize the json in the end or keep it as a JsonValue?
I have not tried
transcode
. I'm not super familiar with it, but would that actually serialize the json in the end or keep it as a JsonValue?
I have never use it myself, but I think this works with serializers, so I assume you'll end up with the "serialized" (or "written") output at the end.
@poros do you have an alternate to map_or
for the tests? it works well locally but fails for CI
Thanks for adding the tests!
It fails for CI because map_or
has been added in version 1.41, while we target a minimum supported version of 1.40. I am not opposed to bumping this up, as the next release is already backward-incompatible.
Anyway, I don't believe you are forced to use map_or
here. You should be able to do something like
assert_eq!(JsonValue::try_from(Value::Boolean(true)).unwrap(), JsonValue::Bool(true));
Would this be OK?
Could you also please pull master? I think your PR now has some minor conflicts.
I'm planning to cut the 0.11 release before the end of the week, in case you'd like your change to get released sooner than later.
Perfect! Thanks for the quick fix :)
I have a use case that would benefit from being able to convert the Avro Value to a Json Value easily.