jsonplaceholder icon indicating copy to clipboard operation
jsonplaceholder copied to clipboard

Add dates to the random data

Open fzaninotto opened this issue 10 years ago • 8 comments

One crucial data type I'm missing from JSONPlaceholder are dates and datetimes. However, the domain could allow for such data (e.g. publication date for posts and comments, creation date for posts, completion data for todos, etc).

Is the current database frozen forever, or do you think the current data can be made richer?

fzaninotto avatar Aug 22 '15 22:08 fzaninotto

Hi @fzaninotto,

Well, I'd rather keep it frozen since it's already used a lot.

But for dates, what would be more convenient: recent dates that are changed every months or fixed ones that will get old eventually?

typicode avatar Aug 29 '15 16:08 typicode

In fact, I'd need many types.

I have begun to build a new dataset, much richer than the one from jsonplaceholder. Not only does it have more datatypes, it also has plausible data, which can be used to demonstrate a powerful API client (you may guess why I'm writing that). It comes with a Node generator that updates (and extends) it at will.

Would you like if I contributed this dataset to build a second server? I wouldn't mind open sourcing it.

fzaninotto avatar Sep 01 '15 10:09 fzaninotto

So here is the dataset I was mentioning: https://github.com/marmelab/ng-admin-demo/blob/gh-pages/data.js

It's used as s source for http://marmelab.com/ng-admin-demo/, using not jsonplaceholder but FakeRest. I'd love a JSONPlaceholder with that kind of data, though...

fzaninotto avatar Sep 04 '15 19:09 fzaninotto

The data being offered at the moment is really basic. Dates are absolute must, time would be nice too and numerical data, for instance, decimal/money would be nice, also integers, for example, quantity.

brgrz avatar Nov 10 '19 20:11 brgrz

Well, I'd rather keep it frozen since it's already used a lot.

Adding additional properties to the serialized JSON does not break existing clients in no way.

brgrz avatar Nov 10 '19 20:11 brgrz

Lol only now I saw this has been open since 2015. Seriously, how hard can this be?

brgrz avatar Nov 10 '19 20:11 brgrz

@fzaninotto Please explain what do you need/require to add that additional types of data, willing to help.

brgrz avatar Nov 10 '19 21:11 brgrz

We've released a more complete test data set under the data-generator-retail npm package. It's got dates... and much more. https://www.npmjs.com/package/data-generator-retail

fzaninotto avatar Nov 12 '19 08:11 fzaninotto