-
Notifications
You must be signed in to change notification settings - Fork 43
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 safe #620
Json safe #620
Conversation
Looks like it does the job, but the option could be more clear. Consider, prototypes.typingsFormat.returnKnown Though if it were me I'd always return the typed value and not have an option. I can't think of why anyone would prefer to get |
great feedback @turadg The reason we use options (for any feature) is so developers that upgrade can choose to have few code changes as possible since a large amount of code is generated. I would suggest we do two phases. One smaller release (patch) with the option defaulting to unknown, and then a minor release to make it the default to have types |
refs: #8917 ## Description Uses cosmology-tech/telescope#620 to get proper return types from `toJSON`. Cleans up our accommodations. Review suggested by commit. ### Security Considerations <!-- Does this change introduce new assumptions or dependencies that, if violated, could introduce security vulnerabilities? How does this PR change the boundaries between mutually-suspicious components? What new authorities are introduced by this change, perhaps by new API calls? --> ### Scaling Considerations <!-- Does this change require or encourage significant increase in consumption of CPU cycles, RAM, on-chain storage, message exchanges, or other scarce resources? If so, can that be prevented or mitigated? --> ### Documentation Considerations <!-- Give our docs folks some hints about what needs to be described to downstream users. Backwards compatibility: what happens to existing data or deployments when this code is shipped? Do we need to instruct users to do something to upgrade their saved data? If there is no upgrade path possible, how bad will that be for users? --> ### Testing Considerations <!-- Every PR should of course come with tests of its own functionality. What additional tests are still needed beyond those unit tests? How does this affect CI, other test automation, or the testnet? --> ### Upgrade Considerations <!-- What aspects of this PR are relevant to upgrading live production systems, and how should they be addressed? -->
JsonSafe
helper typeprototypes.typingsFormat.jsonSafe
optionshould close #605
cc @turadg