
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
jsonplaceholder
Advanced tools
JSONPlaceholder is a simple fake REST API for testing and prototyping.
It's like an image placeholder but for web developers.
JSONPlaceholder is powered by JSON Server.
Most of the time when trying a new library, hacking a prototype or following a tutorial, I found myself in need of some data.
I didn't like the idea of using some public API because I had the feeling that I was spending more time registering a client and understanding a complex API than focusing on my task.
But I liked the idea of image placeholders for web designers. So I decided to code a little Express server inspired by that and here is JSONPlaceholder.
You can find it running here and are free to use it in your developments: http://jsonplaceholder.typicode.com.
Or you can run it locally:
$ npm install -g jsonplaceholder
$ jsonplaceholder
I hope you will find it useful.
Let's start with resources, JSONPlaceholder provides the usual suspects:
Here's some code using jQuery showing what can be done with JSONPlaceholder. Since GitHub loads jQuery, you can simply copy and paste these examples in a console.
$.ajax('http://jsonplaceholder.typicode.com/posts/1', {
method: 'GET'
}).then(function(data) {
console.log(data);
});
$.ajax('http://jsonplaceholder.typicode.com/posts', {
method: 'GET'
}).then(function(data) {
console.log(data);
});
// POST adds a random id to the object sent
$.ajax('http://jsonplaceholder.typicode.com/posts', {
method: 'POST',
data: {
title: 'foo',
body: 'bar',
userId: 1
}
}).then(function(data) {
console.log(data);
});
/* will return
{
id: 101,
title: 'foo',
body: 'bar',
userId: 1
}
*/
Note: the resource will not be really created on the server but it will be faked as if.
$.ajax('http://jsonplaceholder.typicode.com/posts/1', {
method: 'PUT',
data: {
id: 1,
title: 'foo',
body: 'bar',
userId: 1
}
}).then(function(data) {
console.log(data);
});
/* will return
{
id: 1
title: 'foo',
body: 'bar',
userId: 1
}
*/
$.ajax('http://jsonplaceholder.typicode.com/posts/1', {
method: 'PATCH',
data: {
title: 'foo'
}
}).then(function(data) {
console.log(data);
});
/* will return
{
id: 1
title: 'foo',
body: 'quia et suscipit [...]',
userId: 1
}
*/
Note: the resource will not be really updated on the server but it will be faked as if.
$.ajax('http://jsonplaceholder.typicode.com/posts/1', {
method: 'DELETE'
});
Note: the resource will not be really deleted on the server but it will be faked as if.
Basic filtering is supported through query parameters.
// Will return all the posts that belong to the first user
$.ajax('http://jsonplaceholder.typicode.com/posts?userId=1').then(function(data) {
console.log(data);
});
One level of nested route is available.
$.ajax('http://jsonplaceholder.typicode.com/posts/1/comments').then(function(data) {
console.log(data);
});
// Which is equivalent to /comments?postId=1
Here's the list of available nested routes:
$.ajax('http://jsonplaceholder.typicode.com/posts/1', {
dataType: 'jsonp'
}).then(function(data) {
console.log(data);
});
FAQs
A simple fake REST API server for testing and prototyping.
We found that jsonplaceholder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.