-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ByteArray as input for json.Parser
The JSON parser now takes a `ref ByteArray` as its input, instead of a `String`. This makes parsing files and the likes a bit more efficient, as you don't need to first convert the bytes into a `String` just so you can parse it. As part of this, json.parse is moved to Json.parse_string, and Json.parse_bytes is added to parse a `ByteArray`. Finally, the runtime functions for parsing strings are changed to simply take a pointer and a size, instead of a string and a range. This removes the need for an intermediate `String`. This fixes #357. Changelog: changed
- Loading branch information
1 parent
706e3b9
commit c78555e
Showing
5 changed files
with
95 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters