jeudi 5 octobre 2017

What does {0,} mean in a JSON Schema pattern for a string

I've not done a lot with JSON Schemas and I researched this but haven't found an answer (I even downloaded the ECMS-262 Standard). I'm working on a JSON report program and the schema author just changed on of the definitions:

"type":{ "id":"http://dummyurl/type", "type":"string", "pattern":"^[a-zA-Z]{0,}$", "enum":[ "XType", "Charge", "Prince"

The change was from {1,} to {0,} in the pattern.

My two questions are: 1) what does the change from {1,} to {0,} accomplish? 2) with the enum what does the pattern do?

Aucun commentaire:

Enregistrer un commentaire