1
0
Fork 0
forked from fun/fun

Renamed ./src/external to ./src/extensions. No code logic changes. (0.40.5)

This commit is contained in:
Johannes Findeisen 2026-04-19 00:02:36 +02:00
commit bb704a3778
25 changed files with 81 additions and 414 deletions

View file

@ -0,0 +1,33 @@
---
layout: page
published: true
noToc: false
noComments: false
noDate: false
title: Fun - JSON (json-c) extension (optional)
subtitle: Documentation for JSON (json-c) extension (optional)
description: Documentation for JSON (json-c) extension (optional)
permalink: /documentation/extensions/json/
lang: en
tags:
- extension
- json
- optional
---
- CMake option: FUN_WITH_JSON=ON
- Purpose: JSON parse/stringify and file helpers via json-c.
- Homepage: [https://json-c.github.io/json-c/](https://json-c.github.io/json-c/){:class="ext"}
## Opcodes:
- OP_JSON_PARSE: pops text; pushes value or Nil on error
- OP_JSON_STRINGIFY: pops pretty:int(0/1), value; pushes string
- OP_JSON_FROM_FILE: pops path; pushes value or Nil
- OP_JSON_TO_FILE: pops pretty:int(0/1), value, path; pushes 1/0
## Notes:
- Requires json-c development headers/libs.
- When disabled, functions push empty/neutral values similar to other optional modules.