Coervice validation and conversion from strings

26 views
Skip to first unread message

Andy Robinson

unread,
Sep 1, 2014, 9:52:00 AM9/1/14
to jsons...@googlegroups.com
Hi everyone,

I'm looking to build a system for data validation and conversion.   The main use case is business users providing mostly-tabular data in files (copy/paste, tab- or comma-delimited spreadsheet exports, sometimes web forms).   Humans make all kinds of errors themselves, or are prey to others due to varying spreadsheets, OS versions etc.   

The ideal library would be based on the json-schema standard, which could also be used for defining other things like data feeds;  but would support *coercive validation*.   Thus, if the schema says 'price' is a number, and you give me the string '34.99', the validator should convert it and return the cleaned tree.   Or, I should be able to plug in a function which can detect a currency amount (maybe with currency symbols or commas before thousands), clean it up, and either return the amount or raise a ValidationError.

Does jsonschema support this ?  And if not, can you give any hints on a clean way to extend it to do so?

Thanks very much


Andy Robinson

Julian Berman

unread,
Sep 2, 2014, 7:57:02 AM9/2/14
to Andy Robinson, jsons...@googlegroups.com

Hey!

This is basically what Seep (https://GitHub.com/Julian/Seep) is envisioned to be, but it needs contributors and time to finish it off.

Have a look and feel free to reach out about it further.

Cheers,

Julian

--
You received this message because you are subscribed to the Google Groups "jsonschema - An implementation of JSON Schema for Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema+...@googlegroups.com.
To post to this group, send email to jsons...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages