-
Notifications
You must be signed in to change notification settings - Fork 373
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
wip(keeper): implement json primitive return #2949
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2949 +/- ##
==========================================
+ Coverage 60.83% 60.89% +0.06%
==========================================
Files 563 563
Lines 75193 75211 +18
==========================================
+ Hits 45743 45803 +60
+ Misses 26076 26046 -30
+ Partials 3374 3362 -12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
overall approach LGTM, let's roll with only supporting primitive types for now
|
||
rtvs := m.Eval(xn) | ||
stringifyResultValues(m, msg.Format, rtvs) |
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.
unused
|
||
const ( | ||
FormatMachine = "machine" // Default machine representation | ||
FormatJSON = "json" |
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.
Maybe let's add a comment like // XXX: EXPERIMENTAL, only supports primitive types for now
Yet another JSON PR 🎉
This is a simpler implementation of the JSON keeper result that introduces JSON primitive results in keeper MsgCall and MsgQuery result. To maintain backward compatibility, it's not enabled by default, and you have to specify the format in the request.
The result will be returned in the form of a parsable JSON array.
Currently, it will resolve types as follows:
<oid:type>
as string<type>
as stringTODOs
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description