Parsing large JSON array

Hi,
I have a large JSON array (1075 elements), which I am attempting to parse. But, when I try to load it, I get the “named tuple size cannot be greater than 300 (size is 1075)” error. Is there a simple workaround?

Thanks!

Are you trying to parse a NamedTuple literal? Have you tried a Hash instead?

The solution here if you know the structure of the JSON is to leverage JSON::Serializable - Crystal 1.10.1 with a struct type and use that instead of a NamedTuple. Will be just as efficient but a lot more flexible.