Skip to content

Instantly share code, notes, and snippets.

@manchuwook
Last active January 25, 2023 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manchuwook/1b9d6a8a1f030f7cd1dd0c70ae307fc3 to your computer and use it in GitHub Desktop.
Save manchuwook/1b9d6a8a1f030f7cd1dd0c70ae307fc3 to your computer and use it in GitHub Desktop.
Stoplight @stoplight/json
import { parseWithPointers, safeParse, safeStringify } from "@stoplight/json";
const result = parseWithPointers(`{
"hello": "world",
"address": {
"street": 123
}
}`);
console.log(result.data);
console.log(result.pointers); // Returns undefined
@manchuwook
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment