百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

minimal-json

> 编程语言
开源

一个快速而小巧的 JSON 分析器和写入器,适用于 Java

744 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个快速而小巧的 JSON 分析器和写入器,适用于 Java

minimal-json [已废弃]

我很高兴看到 minimal-json 仍然在使用,但我再也无法维护这个项目了。如果有人积极维护一个遵循 minimal-json 理念的分支,我很乐意在此链接到这个仓库。谢谢。 一个用于 Java 的快速且简洁的 JSON 解析器和写入器。 它不是一个对象映射器,而是一个简单的库,旨在

  • minimal:没有依赖项,单个包只包含少数类,下载大小小( {"name": "Alice", "points": 23} JsonArray user = Json.array().add("Bob").add(42); // -> ["Bob", 42]

You can also create JSON arrays conveniently from Java arrays such as `String[]`, `int[]`, `boolean[]`, etc.:

java String[] javaNames = {"Alice", "Bob"}; JsonArray jsonNames = Json.array(names);


### Modify JSON arrays and objects

You can replace or remove array elements based on their index. The index must be valid.

java jsonArray.set(1, 24); jsonArray.remove(1);


Likewise, members of JSON objects can be modified by their name. If the name does not exist, `set` will append a new member.

java jsonObject.set("quantity", 24); jsonObject.remove("quantity");


`JsonObject` also provides a `merge` method that copies all members from a given JSON object.

java jsonObject.merge(otherObject);


### Output JSON

The `toString` method of a `JsonValue` returns valid JSON strings.
You can also write to a `java.io.Writer` using `writeTo`:

java String json = jsonValue.toString(); jsonValue.writeTo(writer);


Both methods accept an additonal parameter to enable formatted output:

java String json = jsonValue.toString(WriterConfig.PRETTY_PRINT); jsonValue.writeTo(writer, WriterConfig.PRETTY_PRINT);

…

xml com.eclipsesource.minimal-json minimal-json 0.9.5


Development snapshots are available on [oss.sonatype.org](https://oss.sonatype.org/content/repositories/snapshots/com/eclipsesource/minimal-json/minimal-json/).

Build
-----

To build minimal-json on your machine, checkout the repository, `cd` into it, and call:

mvn clean install

连续集成构建正在 [Travis-CI](https://travis-ci.org/ralf) 运行中

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Java

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言