Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A ArduinoJson
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Benoît Blanchon
  • ArduinoJson
  • Issues
  • #1833
Closed
Open
Issue created Dec 12, 2022 by Jeroen88@Jeroen88

Add JSON validation only?

Is your feature request related to a problem? Please describe.
Not a problem. just a useful function..

Describe the solution you'd like
A function DeserializationError error = deserializeJson(json) that just reports if the input JSON is a valid JSON.

Describe alternatives you've considered
I do:

  StaticJsonDocument<0> emptyDoc;
  StaticJsonDocument<0> filter;

  DeserializationError error = deserializeJson(emptyDoc, json, DeserializationOption::Filter(filter));

and that does exactly what I want. But I depend on undefined semantics: keys not present in the filter might as well be skipped instead of parsed, but it seems they are parsed too.

Additional context
None. It is not a big deal, the above alternative is also OK.

Assignee
Assign to
Time tracking