-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for parsing and generating JSON
This adds the std::json module, providing the means to parse JSON strings and generate JSON strings from Inko objects. When parsing a JSON string, the result is a std::json::Json value. These values in turn can be converted (back) to JSON using Json.to_string and Json.to_pretty_string. The JSON parser is compliant with RFC 8259 and behaves as expected per the tests from https://seriot.ch/projects/parsing_json.html. The parser doesn't use a tokenizer as there's no need for one, and this reduces the amount of allocations the parser needs. This fixes https://gitlab.com/inko-lang/inko/-/issues/290. Changelog: added
- Loading branch information
1 parent
8bc9613
commit 09d8178
Showing
7 changed files
with
1,263 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
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
Oops, something went wrong.