Feature Request: in dump/safeDump support toJSON API
See original GitHub issuetoJSON
documented here for JSON.stringify
:
If an object being stringified has a property named toJSON whose value is a function, then the toJSON() method customizes JSON stringification behavior: instead of the object being serialized, the value returned by the toJSON() method when called will be serialized.
If dump
and safeDump
would support this, js-yaml would be better as a direct replacement for JSON. For example, Immutable provides toJSON
. Could be optional, as far as I am concerned, so it’s backwards compatible.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Feature request: Limit fields returned from API calls
So if I asked for data about 100 tickets, I could potentially get 100,000 lines of JSON because it includes all the custom_fields...
Read more >performance.toJSON() - Web APIs - MDN Web Docs
The toJSON() method of the Performance interface is a serializer; it returns a JSON representation of the Performance object.
Read more >Feature Request: JSON Format Tag - Laserfiche Answers
Hello,. Lately I've had an increasing number of Workflows that use the Web Request to interact with APIs using data collected in a...
Read more >Issue tracking system and product feature requests
To view issue trackers, see Search for or create issues and feature requests, by product. To report an issue with the Google Cloud...
Read more >Using fromJSON() | ArcGIS Maps SDK for JavaScript 4.25
JSON in this format is typically created from a toJSON() method or a query via ... you can require the esri/renderers/support/jsonUtils object and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
IMHO it’s better to keep things separate. If you know you can normalize object to json, then you can do:
This should work right now and does not require any changes.
Could you then refer/move new info to existing issue and close this one?