-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json lazy parser unparser and support for reading NULL values. #1978
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1978 +/- ##
========================================
Coverage 49% 49%
- Complexity 6297 6325 +28
========================================
Files 664 665 +1
Lines 59558 59690 +132
Branches 8639 8656 +17
========================================
+ Hits 29437 29594 +157
+ Misses 27908 27862 -46
- Partials 2213 2234 +21 ☔ View full report in Codecov by Sentry. |
…s. Have to bring that back somehow by expecting NULL in the specific loops for keyword parameters
@tvdstorm I added the null values here. Do you fancy the solution? |
Since this adds parameters to Java methods we have to wait until after the current release cycle to merge this. |
…and quoted strings with unbalanced quotes
A lot of things are happening in this PR, and I'm missing:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes to JsonValueReader
are hard to oversee, it mostly looks fine, but I would want to take some time and test the impact on VS Code and it's use of the JsonValueReader
class.
@@ -164,7 +164,7 @@ | |||
<configuration> | |||
<isPackageCourse>false</isPackageCourse> | |||
<enableStandardLibrary>false</enableStandardLibrary> | |||
<errorsAsWarnings>false</errorsAsWarnings> | |||
<errorsAsWarnings>true</errorsAsWarnings> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want this as part of this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary for bootstrapping the tutor
|
||
data Cons = cons(str bla = "null"); | ||
|
||
test bool dealWithNull() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seeing the changes in JsonIOReader, I expected more tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are missing for the formatter/parser functionality. I'll add simple tests later.
The feature has been tested in-depth with the vis::Graph module (which was the primary motivation)
The changes have been designed such that there can't be impact on existing uses of the JSON IO clients, unless they were waiting for NPEs for inputs with Recommend to focus on that distintion. Typically |
The other changes are only activated by providing new actual keyword parameters to |
This is a new feature of the JSON serializer/deserializer; it allows us to serialize to JSON, but at given places in an algebraic data-type map the contents to JSON strings, and back parse them back to ADTs when we receive a string input.
@tvdstorm this should come in handy for
salix
and thevis::*
library when we have more structure in Rascal than we have on the JS/TS side. Could you have a look?I plan to use this myself to improve the styling feature in the cytoscape.js library, which uses a small string-based embedded DSL for node and edge selectors. https://js.cytoscape.org/#selectors EDIT: did that on this branch to demonstrate what you can do with the formatter/parser extension to the JSON IO library.