ImmutableRecord to/from JSON
kyri-petrou opened this issue · comments
Hi there. This is probably very simple but can't seem to be able to figure it out, so any help is much appreciated.
Is it possible to convert/construct an ImmutableRecord to/from a JSON string?
You would probably need to load the json via the json input streams.
…On Sun, 19 Jun 2022 at 05:45, kyri-petrou ***@***.***> wrote:
Hi there. This is probably very simple but can't seem to be able to figure
it out, so any help is much appreciated.
Is it possible to convert/construct an ImmutableRecord to/from a JSON
string?
—
Reply to this email directly, view it on GitHub
<#725>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGQ7G4YN3S6ZEX4AGXTVP326LANCNFSM5ZGFY67A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Try something like this:
AvroInputStream.json.from(...).build(...)
…On Sun, 3 Jul 2022 at 21:15, Stephen Samuel (Sam) ***@***.***> wrote:
You would probably need to load the json via the json input streams.
On Sun, 19 Jun 2022 at 05:45, kyri-petrou ***@***.***>
wrote:
> Hi there. This is probably very simple but can't seem to be able to
> figure it out, so any help is much appreciated.
>
> Is it possible to convert/construct an ImmutableRecord to/from a JSON
> string?
>
> —
> Reply to this email directly, view it on GitHub
> <#725>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAFVSGQ7G4YN3S6ZEX4AGXTVP326LANCNFSM5ZGFY67A>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
Thanks for that. I couldn't get it to work initially but I think it was because I was using avro4s 4.x with Scala 3 via the Scala 2.13 compatibility