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

Code fails in arrays #3

Open
legraphista opened this issue Nov 14, 2017 · 0 comments
Open

Code fails in arrays #3

legraphista opened this issue Nov 14, 2017 · 0 comments
Assignees
Labels

Comments

@legraphista
Copy link
Owner

since arrays don't have visible keys, the parsing fails to find the index, so given:

schema:

joi.array().items(joi.number())

properties:

[
  1,
  2,
  "a"
]

the regex tries to find 2: and fails

for now i'll just add a try/catch for it not stop the values from updating, but refactoring the json parse (maybe using a json stream parser) is a must

@legraphista legraphista self-assigned this Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant