Jason Decoding Error

I’m trying to decode a a long Json string -which has embedded jsons- in iex -S mix with Jason.decode! but it produces this error

:gen_event handler Logger.Backends.Console installed in Logger terminating
** (exit) an exception was raised:
    ** (RuntimeError) no device registered with the name :user
        (logger) lib/logger/backends/console.ex:156: Logger.Backends.Console.async_io/2
        (logger) lib/logger/backends/console.ex:141: Logger.Backends.Console.log_event/5
        (logger) lib/logger/backends/console.ex:45: Logger.Backends.Console.handle_event/2
        (stdlib) gen_event.erl:577: :gen_event.server_update/4
        (stdlib) gen_event.erl:559: :gen_event.server_notify/4
        (stdlib) gen_event.erl:300: :gen_event.handle_msg/6
        (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

Could anyone help me?
Thanks in advance

I believe the user process in erlang is what does IO, if I remember correctly. How large is the JSON string? Have you tried parsing it while not in the console?

2 Likes

It is really large, it has list of jsons that has 2 lists of embedded jsons. No, I haven’t tried it out of the console yet, I was just trying to visualize how it would be parsed before writing the actual code.

I believe you should try it in the console because I am not sure your original error is related.

1 Like

The json response was very complicated to trace at once. I’m now able to decode it at multiple steps.

1 Like