# Replacing json11?

**URL:** https://yosyshq.discourse.group/t/replacing-json11/101
**Category:** Developers
**Created:** [November 5, 2025, 9:33am UTC](https://yosyshq.discourse.group/t/replacing-json11/101 "2025-11-05T09:33:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![donn](https://yyz2.discourse-cdn.com/free1/user_avatar/yosyshq.discourse.group/donn/32/7_2.png) [@donn](https://yosyshq.discourse.group/u/donn)
#### Post date: [November 5, 2025, 9:33am UTC](https://yosyshq.discourse.group/t/replacing-json11/101/1 "2025-11-05T09:33:27Z")

</div>

Hiya-

I’ve recently struggled to write a pass that consumes JSON output from [GitHub - Silimate/liberty2json: Liberty to JSON converter](https://github.com/silimate/liberty2json) as part of contract work. Because Yosys already uses json11, I elected to just use the library Yosys is already compiling and linking against because why not?

This lead me to discovering two limitations with the library:

1. Lack of typing ergonomics: json11 will return a non-specific default value of a certain type. `0, '', {}, []`, you name it. You have to opt-in to check if the key exists, then check it’s of the correct type, THEN check:

2. Poor error reporting experience

json11 appears to be an unmaintained library now, so I’m wondering if maintainers would be amenable to a replacement with either [RapidJSON](https://github.com/Tencent/rapidjson) or [nlohmann::json](https://github.com/nlohmann/json)? Both have better validation capabilities - though RapidJSON is performance-focused and nlohmann::json is ergonomics-focused.

---

<div class="post-metadata">

### Author: ![widlarizer](https://avatars.discourse-cdn.com/v4/letter/w/bbce88/32.png) [@widlarizer](https://yosyshq.discourse.group/u/widlarizer)
#### Post date: [November 7, 2025, 11:38pm UTC](https://yosyshq.discourse.group/t/replacing-json11/101/2 "2025-11-07T23:38:54Z")

</div>

I think Yosys uses JSON in very simple ways so I don’t foresee issues with what we have, but PRs are welcome if anybody does find value in switching the implementation over to something else
