Hacker News new | past | comments | ask | show | jobs | submit login
Random JSON data generator (json-generator.com)
141 points by davidbarker on May 1, 2014 | hide | past | favorite | 29 comments



Cache: http://i.imgur.com/uJUofyS.png

For those wondering

    {{eval(String.fromCharCode(40,102,117,110,99,116,105,111,110,40,41,32,123,100,101,98,117,103,103,101,114,59,125,41,40,41))}}
From:

    'String.fromCharCode(' + ('(function() {debugger;})()'.split('').map(function(c) { return c.charCodeAt(0) }).join()) + ')'


The site is over quota and I have no clue what your comment means.


It was working a second ago. It's just a way to execute javascript code.

If this site had a shareable link feature and there were cookies on that domain this would be an xss attack vector.


Sorry, what I meant was, I have no clue what relevance eval'ing a function that calls debugger has to the article.


Amazing. I didn't even realize I was wasting time generating my own sample JSON data until I played with this.


I was expecting a fuzzer what would let me generate things to try to corrupt my JSON interpreter, but this is much more useful.


Does this have an API? I could see it being a great tool if it did.


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.


"Over Quota

This application is temporarily over its serving quota. Please try again later."

Side-effects of using App Engine :(


OP just needs to scale up. Advantages of App Engine :)


It would be great if this was published as an npm module.


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!

[0] https://github.com/fzaninotto/Faker


There is an npm module available.

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


http://stolksdorf.github.io/JsonGen/ Enjoy.

Eerily similar syntax to submitted one. I could roll this into a npm module rather quickly.


I started working on something like this a few months ago.

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.


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.



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...


Here is the javascript: http://www.json-generator.com/js/app.753945435.js

Don't think the source is open-source, though.


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.

unless of course, I'm missing some key feature?


Wow, this looks awesome. Unfortunately the site was hugged to death, anyone know if it's on Github?


I think this could be even more useful if it took a JSON schema or something as a template instead.


+1 for awesome/simple. Would be great if this came with validators for the different types.


For fixture generation / mocking API that would be great


Would be an amazing command line app.


used it last night... now it's down. It's an awesome resource


So it's popular :)


and it's over quota.


Should have set up nginx using the cache module to overcome this over-quota thing.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: