seroval 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -139,13 +139,13 @@ console.log(deserialize(serialize(value)) === value);
139
139
 
140
140
  `serialize` and `deserialize` is great for server-to-client communication, but what about the other way? `serialize` may cause an [RCE if used as a payload for requests](https://huntr.dev/bounties/63f1ff91-48f3-4886-a179-103f1ddd8ff8). `seroval` includes `toJSON` and `fromJSON` as an alternative form of serialization.
141
141
 
142
- First example above outputs the following json
142
+ First example above outputs the following JSON
143
143
 
144
144
  ```js
145
145
  import { toJSON } from 'seroval';
146
146
  // ...
147
147
  const result = toJSON(object);
148
- console.log(result);
148
+ console.log(JSON.stringify(result));
149
149
  ```
150
150
 
151
151
  ```json