nowfound

AI · May 4, 2023

GPT-JSON – Structured and typehinted GPT responses in Python

Hey HN, I've been using GPT a lot lately in some side projects around data generation and benchmarking. During the course of prompt tuning I ended up with a pretty complicated request: the value that I was looking for, an explanation, a criticism, etc. JSON was the most natural output format for this but results would often be broken, have wrong types, or contain missing fields. There's been some positive movement in this space, like with jsonformer (https://github.com/1rgs/jsonformer) the other day. But nothing that was plug and play with GPT. This library consolidates…

GPT-JSON – Structured and typehinted GPT responses in Python launched on May 4, 2023 with 174 votes, #199 of 4,910 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 3 years on.

Visit github.com ↗Alternativestop 4% of May 2023

In plain words

GPT-JSON is a Python library that handles structured outputs from GPT by ensuring responses are properly formatted JSON with correct types and complete fields. It lets developers specify expected output schemas, inject dynamic prompts, correct common formatting errors, and validate results using Pydantic for type hints. Built from logic consolidated across multiple projects, it provides a plug-and-play solution for reliably extracting complex, multi-field data like values, explanations, and critiques from GPT API calls.

written from the facts on this page · September 2026

From the sources

Structured and typehinted GPT responses in Python. Contribute to piercefreeman/gpt-json development by creating an account on GitHub.

In the maker’s words, at launch

Hey HN, I've been using GPT a lot lately in some side projects around data generation and benchmarking. During the course of prompt tuning I ended up with a pretty complicated request: the value that I was looking for, an explanation, a criticism, etc. JSON was the most natural output format for this but results…

Does a similar job

all alternatives →
  • Structured output from LLMs without reprompting2023 · automorphic.ai · ▲174

    Built a tool for transforming unstructured data into structured outputs using language models (with 100% adherence). If you're facing problems getting GPT to adhere to a schema (JSON, XML, etc.) or regex, need to bulk process some unstructured data, or generate synthetic data, check it out. We run our own tuned model (you can self-host if you want), so, we're able to have incredibly fine grained control over text generation. Repository: https://github.com/automorphic-ai/trex Playground: https://automorphic.ai/playground

  • JSON For You – Visualize JSON in graph or table views2024 · github.com · ▲211

    After two years of improvement, I think it's time to share it with you all. Here’s a quick overview: - Common features include validation, formatting, minification, and more. - Visualize JSON in a graph or table view. - Structured comparison with fallback to text comparison. - Navigate though JSON using JSON pointer. - Supports jq. Would love to hear the community's questions, thoughts and comments!

  • Get structured and typed JSON outputs via GPT-3.5/4 functions2023 · github.com · ▲5

    Get structured, fully typed, and validated JSON outputs from OpenAI and Anthropic models. - dzhng/zod-gpt

  • JSON5 — modern JSON2012 · github.com · ▲64

    JSON5 — JSON for Humans. Contribute to json5/json5 development by creating an account on GitHub.

  • AT
    Anything To JSON – a language model for structured extraction2024 · anythingtojson.com · ▲18

    Hey HN! Erik here from banana.dev We’ve trained a small(ish) language model on structured extraction, and today we’re launching a playground for it at https://anythingtojson.com. Give it a try! This model continues our work on structured generation, following last week’s launch of Fructose[1], a python client for strongly-typed LLM responses. There seem to be two distinct halves of the problem intended to be solved by Fructose and structured generation: 1. the reasoning ability of the model, such as performing chain of thought, creative acts, and natural language tasks. In a way,…

  • Python JSON library in Rust, faster than ujson2018 · github.com · ▲40

    Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy - ijl/orjson

More ai this month

the category →
  • Video model that turns script into viral social media videos

    AI · 17d ago · spira.ai

  • The browser where Claude Code and Codex work beside you

    AI · 17d ago · rill.love

  • Kolibri is Aleph Alpha

    AI · 19d ago · tej.as

  • Paintings by AI models: programs run through a simulation of oil paint.

    AI · 20d ago · stillwet.art

  • A real-time world model you can explore and change

    AI · 29d ago · world.pixverse.video

  • Hemory▲381

    Keep listening. Searchable memory for your AI agents.

    AI · 30d ago · hemory.com

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, May 2023

the whole month →
  • Sidekick▲1,341

    An AI-powered accessibility assistant in Stark

    AI · 2023 · getstark.co

  • In today's world, catchy headlines and articles often distract readers from the facts and relevant information. By utilizing OpenAI's language models, Boring Report processes sensationalist news articles, transforms them into the content you see, and helps readers focus on the essential details. We recently updated our iOS app experience, so any and all feedback would be appreciated. App Link: https://apps.apple.com/us/app/boring-report-news-by-ai/id644...

    AI · 2023 · boringreport.org

  • Generating powerful websites, one prompt at a time

    AI · 2023

  • AudioPen▲888

    The easiest way to convert messy thoughts into clear text

    AI · 2023 · audiopen.ai

  • Launch your website in seconds, get users in minutes

    Dev tools · 2023 · page.mmntm.build

  • Moda▲791

    An e-commerce growth marketing platform

    Growth · 2023