Allow ByteArray as input when parsing JSON #357
Labels
accepting contributions
Issues that are suitable to be worked on by anybody, not just maintainers
feature
New things to add to Inko, such as a new standard library module
std
Changes related to the standard library
Milestone
The JSON parser introduced in
master
only supportsString
as input, which makes parsing files rather wasteful/clunky as you first have to convert aByteArray
to aString
. Instead the JSON parser should just support bothString
andByteArray
.For this to work we probably need to introduce a trait that is both implemented by
String
andByteArray
, and use that as the expected input. The parser does try to parse strings into Int/Float values (with a custom offset) in a few places, so we need a way of handling that.The text was updated successfully, but these errors were encountered: