JSON Forge
100% Client-Side: your data is never sent to a server

JSON examples

Blog Posts JSON Example

A list of articles with embedded authors and tags, the shape most blog and CMS APIs return.

Loading editor…
Paste or type JSON on the left to explore it as a tree.
Empty🔒 Processed locally in your browser

The example

The JSON above is the example. Explore it in the Tree tab, press Download to save it as a .json file, or Share to send someone a link to it. All names, ids, emails and values are invented.

Fields explained

PathTypeNotes
posts[].slugstringA URL-friendly identifier used in links.
posts[].authorobjectEmbedded so one request is enough to display the list.
posts[].tagsarray of stringsA many-to-many relation expressed as a list of names.
posts[].publishedAtstringISO 8601 timestamp, sortable as text.
posts[].commentsCountnumberA precomputed number so the list does not need the comments.

Read it in code

JavaScript:

const byAuthor = Object.groupBy(data.posts, (p) => p.author.handle);

Python:

from collections import defaultdict
by_author = defaultdict(list)
for p in data["posts"]:
    by_author[p["author"]["handle"]].append(p)

What this example is good for

Tips

Convert this example

Open it in a converter, then switch the output in the Code tab:

More examples

All JSON examples · Cheat sheets