frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

A practical guide to converting YAML to JSON safely (with Kubernetes examples)

https://coderaviverma.github.io/yaml-to-json-guide/
5•jsonviewertool•1d ago

Comments

jsonviewertool•1d ago
YAML is great for human-readable configuration, but many APIs and tools expect JSON.

I wrote this short guide to explain when YAML → JSON conversion is required, common pitfalls (indentation, duplicate keys, anchors), and how this shows up in real Kubernetes and API workflows.

Feedback welcome.

alpb•1d ago
Is there an actual guide? It seems you've mainly pasted something along the lines of a ChatGPT output to a Github Pages html.
jsonviewertool•19h ago
Fair question.

The GitHub Pages article is intentionally minimal, but it’s not meant to be a generic LLM dump. The examples come from real issues I’ve hit while working with Kubernetes manifests and CI pipelines — especially duplicate keys, implicit type coercion, and indentation edge cases that silently break JSON conversion.

I’m actively expanding it with: - concrete Kubernetes + API payload examples - cases where YAML parses but produces invalid JSON - notes on tooling differences (yq, js-yaml, browser-based parsers)

The online converter exists mainly as a reference implementation that runs fully client-side and exposes these edge cases clearly: https://jsonviewertool.com/yaml-to-json

Happy to improve the guide based on feedback — appreciate the pushback.

jsonviewertool•1d ago
One thing I learned while writing this is how often YAML duplicate keys silently break JSON conversion in CI pipelines. Curious if others have run into similar issues.
ramraj07•1d ago
If someone can write something to convert between json and xml ill bless your offspring.
BadBadJellyBean•1d ago
JSON to XML should be easy but XML to JSON can not really be done 1 to 1 because of attributes. There is no clear way how to map them. You can establish a mapping for yourself but it will just be a convention on top of JSON.
BadBadJellyBean•1d ago
https://git.screebo.net/cperrin/XMLJSONConverter

Courtesy of Junie/Claude

swores•1d ago
Are LLMs too expensive, or not reliable enough at not making mistakes, or just something you haven't considered?

It's not something I generally need to do, so I haven't been keeping up with how good LLMs are at this sort of conversion, but seeing your question I was curious so I took a couple of examples from https://www.json.org/example.html and gave them to the default model in the ChatGPT app (GPT 5.2 - at least that's the default for my ChatGPT Plus account) and it seemed to get each of them right on the first attempt.

alpb•1d ago
Have you tried:

    cat file.yaml | yq -ojson

Toyota uses retro-style games and prizes to urge US workers to lobby politicians

https://www.theguardian.com/us-news/2025/dec/19/toyota-employee-lobbying
1•PaulHoule•26s ago•0 comments

Show HN: I built a small tool to sanity-check ad revenue assumptions

https://tatrezvalthazarsite.blogspot.com/p/tatrez-ad-revenue-estimator_8.html
1•Traumen•2m ago•1 comments

Rust Is Perfectly Imperfect

http://0x80.pl/notesen/2026-01-08-imperfect-rust.html
2•mfiguiere•3m ago•0 comments

An Underappreciated Variable in Sports Success

https://www.theatlantic.com/health/2026/01/athletic-success-luck/685533/
2•breve•3m ago•0 comments

Consumer electronics, the "Modular Middle", and production models of the future

https://www.a16z.news/p/everything-is-computer
1•walterbell•4m ago•0 comments

Solar hydrogen can now be produced efficiently without the scarce metal platinum

https://www.eurekalert.org/news-releases/1111199
1•westurner•4m ago•0 comments

BirdBot, an energy-efficient robot leg inspired by birds' legs (2022) [video]

https://www.youtube.com/watch?v=PXXdaqseHis
1•Luc•4m ago•0 comments

Multi-platform WhatsApp client written in Rust

https://github.com/jlucaso1/whatsapp-rust
1•justmarc•4m ago•0 comments

OAuth 2.0 Security Best Practices for Developers

https://maida.kim/oauth2-best-practices-for-developers/
1•mooreds•5m ago•0 comments

Code Coverage for GoAWK (2022)

https://maximullaris.com/goawk_cover.html
1•benhoyt•7m ago•0 comments

We Keep Making the Same Software Mistakes

https://spectrum.ieee.org/avoidable-software-failures-cost-trillions
1•Growtika•8m ago•0 comments

Gut Microbes Played Role in Evolution of Human Brain, New Study Suggests

https://www.sci.news/biology/gut-microbes-human-brain-evolution-14461.html
1•gmays•9m ago•0 comments

Reusable "skills" for coding agents: how to design them so they do not drift

https://clipnotebook.com/blog/reusable-skills-for-coding-agents
3•amandapoDEV•11m ago•1 comments

How to Fool a Neural Network

https://briefer.cloud/blog/posts/fooling-neural-networks/
1•rafaepta•11m ago•0 comments

AG Pax­ton Secures Win Stop­ping Sam­sung from Using Smart TVs to Spy on Texans

https://www.texasattorneygeneral.gov/news/releases/attorney-general-ken-paxton-secures-major-win-...
2•voxadam•11m ago•1 comments

Decoding the Astonishing Secret Languages of Animals

https://atmos.earth/science-and-nature/decoding-the-astonishing-secret-languages-of-animals/
1•bikeshaving•12m ago•0 comments

Detecting "AI Slop" with Shannon Entropy (Python)

https://steerlabs.substack.com/p/detecting-ai-slop-with-shannon-entropy
2•steer_dev•12m ago•1 comments

OpenAPI Isn't Enough

https://alexstephen.me/writing/openapi-isnt-enough/
2•rambleraptor•13m ago•0 comments

GLM-4.7: Advancing the Coding Capability

https://z.ai/blog/glm-4.7?_hsenc=p2ANqtz-_A0g1a_qMPKlnITH_2MrETt56Egtpn06pe9CyarPb7l_DhltBP9TmtFS...
1•rbanffy•14m ago•0 comments

The work of sleep doesn't depend on time

https://blog.affectablesleep.com/p/the-hidden-work-of-sleep-doesnt-depend
1•pedalpete•14m ago•0 comments

Show HN: Semi-private chat with Gemini from your computer

https://github.com/deepanwadhwa/semi_private_chat
1•dwa3592•16m ago•0 comments

Show HN: Ralph2Ralph

https://github.com/eqtylab/real-a2a
2•ramoz•16m ago•0 comments

Richard D. James interviews ex Korg engineer Tatsuya Takahashi (2017)

https://web.archive.org/web/20180719052026/http://item.warp.net/interview/aphex-twin-speaks-to-ta...
1•lelandfe•18m ago•4 comments

Our take on the best Firefox-based browsers for top privacy and customization

https://alternativeto.net/news/2026/1/our-honest-take-on-the-best-firefox-based-web-browsers-for-...
1•elliot_a•19m ago•0 comments

Some super-smart dogs can pick up new words just by eavesdropping

https://www.cnn.com/2026/01/08/science/gifted-dogs-learn-words-overhearing-intl-scli
2•breve•20m ago•0 comments

It's the little things that change your life, really: combining ChatGPT+DocuSign

https://app.yanna.pro/welcome/1
2•abemazak•20m ago•0 comments

Docker Releases Hardened Images for Free – What Does It Do Differently?

https://www.i-programmer.info/news/240-devops/18579-docker-releases-hardened-images-for-free-what...
1•aquastorm•20m ago•1 comments

Mathematics for Computer Science (2018) [pdf]

https://courses.csail.mit.edu/6.042/spring18/mcs.pdf
2•nateb2022•21m ago•0 comments

How Terminals Work

https://how-terminals-work.vercel.app/
1•gnodar•21m ago•0 comments

App for Prayer Reminders

https://prayminder.com/
1•marysminefnuf•23m ago•0 comments