fleece icon indicating copy to clipboard operation
fleece copied to clipboard

JSON Schema validator

Open snej opened this issue 11 months ago • 0 comments

JSONSchema class parses a JSON Schema and validates Fleece Values against it. See header file for class documentation. You may want to look at the JSON Schema docs / tutorial.

Other Fleece API changes supporting this:

  • Added slice::UTF8Length(), which counts the number of UTF-8 code points
  • Added FLEvalJSONPointer(), a wrapper around fleece::impl::Path::evalJSONPointer()
  • Added FLDictIterator_BeginSK(), exposing the existing ability to pass a SharedKeys to a Dict::iterator

Bug fixes:

  • Fixed some limitations of fleece::impl::Path::evalJSONPointer() (it didn't handle escaped keys)
  • Fixed a SharedKeys issue with empty-string keys

Optimizations:

  • Optimized Dict lookup from a Dict::key (aka FLDictKey), mostly by avoiding locating the Dict's SharedKeys unless we have to, since that's very slow.

snej avatar Jan 22 '25 20:01 snej