swaggest / php-json-schema

High definition PHP structures with JSON-schema based validation
MIT License
451 stars 51 forks source link

Unterminated Quoted String #118

Closed braandl closed 3 years ago

braandl commented 3 years ago

When trying to generate a JSON-Schema from a JSON String that contains single-quotes inside of strings, the Lib states:

syntax error: unterminated quoted string

but the JSON input looks valid to me, and can also be transferred to browsers etc.

Example for a failing JSON definition:

{
    "myString": "This is 'an interesting' string"
}
vearutop commented 3 years ago

Hi, could you share some code to reproduce your issue?

braandl commented 3 years ago

Oh, this is very supid, and I am very sorry, but I did mistake the library. The issue is from quicktype not php-json-schema I just misread a namespace. Sorry for the inconvenience.

vearutop commented 3 years ago

No worries, thank you for checking.