Skip to content
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

add more control through configuration @ ParseJSONResultsPlugin. #1170

Draft
wants to merge 1 commit into
base: v0.28
Choose a base branch
from

Conversation

igalklebanov
Copy link
Member

@igalklebanov igalklebanov commented Oct 6, 2024

Hey 👋

This PR revisits ParseJSONResultsPlugin and attempts to provide more fine-grained control to consumers.

  • skipKeys allows you to specify columns to not parse in a result object.
  • reviver allows passing a custom reviver function to the JSON.parse invocations. This can allow you to instantiate native Dates, or omit keys.
  • __proto__ keys are always deleted to deny prototype pollution.
  • isJSON allows overriding what is or what isn't considered a JSON string before attempting to JSON.parse it.

@igalklebanov igalklebanov added built-in plugin Related to a built-in plugin enhancement New feature or request labels Oct 6, 2024
Copy link

vercel bot commented Oct 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2024 11:58am

@igalklebanov igalklebanov changed the title add more control through configuration @ ParseJSONResultsPlugin. add more control through configuration @ ParseJSONResultsPlugin. Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
built-in plugin Related to a built-in plugin enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant