Re:Random JSON data generator
by Patrick_Devine on Thursday May 01, 2014 @06:11PM
(#7682985)
This seems like it would make a really great unix command line utility. You could make it look something like:
randjson <input template>
and it would fill in the template for you and spit it to stdout. That way you can include it in things like Makefiles or build scripts for testing various parts of your code.
Re:Random JSON data generator
by joshstrange on Thursday May 01, 2014 @04:09PM
(#7682424)
I was thinking along the same lines, I've used Faker [0] for PHP before and I would love to be able to have an npm module to generate test JSON like this!
Re:Random JSON data generator
by grageth on Thursday May 01, 2014 @03:55PM
(#7682335)
Alright that is freaking nice! Great work! +1 for API. Be nice to be able to send my template (left side of window) and get back the JSON on the right.
Re:Random JSON data generator
by ottertown on Thursday May 01, 2014 @04:04PM
(#7682391)
tried using this before (or one similar to it).
the reason I still have to use python is for generating different clusters of objects with distinct attributes (e.g. to create a non-normal distribution within objects and attributes). this system lets you create random clusters of objects without being able to control the distribution because you can't predefine variables.
Re:Random JSON data generator
by acbart on Thursday May 01, 2014 @06:08PM
(#7682972)
I need this as a library for Python, Java, and Racket; it'd be perfect for testing web services that return Java. I should probably fork the Javascript...
For those wondering
From:If this site had a shareable link feature and there were cookies on that domain this would be an xss attack vector.
This application is temporarily over its serving quota. Please try again later."
Side-effects of using App Engine :(
randjson <input template>
and it would fill in the template for you and spit it to stdout. That way you can include it in things like Makefiles or build scripts for testing various parts of your code.
[0] https://github.com/fzaninotto/Faker
https://github.com/marak/Faker.js/
I also wrote a grunt plugin a while back that makes defining schemas for random data a little easier.
https://github.com/timrwood/grunt-ipsum
Eerily similar syntax to submitted one. I could roll this into a npm module rather quickly.
https://github.com/akilism/crashtest
it's still a little bit buggy though and not really user friendly. but it gets the job done for me.
the reason I still have to use python is for generating different clusters of objects with distinct attributes (e.g. to create a non-normal distribution within objects and attributes). this system lets you create random clusters of objects without being able to control the distribution because you can't predefine variables.
unless of course, I'm missing some key feature?
Don't think the source is open-source, though.