lundi 2 novembre 2020

How to get a json schema from a list of json files

So I have a rather complicated black box processes(well not entirely black box, I have the source code it's just a massive project) and would like to generate a schema that can be used for fuzzing tests of the next step in the process. These Jsons have a tenancy to be 10 000+ lines (some as much as 100 000) making something like this site struggle with the larger ones and it even fails in many cases to get the generalized version such as

"Xyz": [ 3.04772, 2.27487, 0.0]

obviously doesn't have a generalised schema of

"Xyz": [3.04772, 2.27487, 0.0 ]

As I have a list of jsons it seems like it should be possible to use the differences between the jsons to find what values can and cannot change, however I'm uncertain on how to do this on any kind of large scale as obviously manually going through 10k lines isn't a good option.

The jsons are generated by C# so it's also acceptable if someone has a good way of fuzzing C# classes (perhaps given examples), or generating schema's suitable for fuzzing json classes?

Aucun commentaire:

Enregistrer un commentaire