哪里有json.org java库消失了? [英] Where has json.org java library gone?

查看:86
本文介绍了哪里有json.org java库消失了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我正在尝试学习JSON,用于Java,但它似乎是一个移动目标 - 有许多库可用,但我更喜欢坚持使用JSON.ORG版本或Oracle Java javax版。
但是,似乎JSON.ORG不再提供文档或官方库。除了登陆页面之外,我找到的.org链接都没有。
例如 http://www.json.org/java

So, I'm trying to learn JSON, for Java, but it appears to be a moving target - there are a number of libraries available, but I prefer to stick to either the JSON.ORG version or the Oracle Java javax version. However, it seems that JSON.ORG no longer provides docs or an 'official' library. None of the .org links I have found - apart from the landing page - work any longer. E.g. http://www.json.org/java

最终的结果是我发现和学习的大部分内容都无法应用,因为它们引用的JSON.ORG库似乎不再可用。

The end result is that much of what I find and learn I can't apply because they reference the JSON.ORG library which does not seem to be available any longer.

着陆页确实提供了可以使用的其他库的列表。其中一个通常命名为:sourceforge上的JSON-lib。这是以前在JSON.ORG上的吗?没有任何参考说明。

The landing page does provide a list of other libraries that can be used. One of these is generically named: JSON-lib on sourceforge. Is this the one that used to be on JSON.ORG? There's no reference that says that.

我错过了什么吗? JSON.ORG库是否可以在其他地方使用,或者我只是坚持使用Oracle的javax.json?或者,Google的版本是更好的选择吗?

Am I missing something? Is the JSON.ORG library available elsewhere, or shuld I just stick with Oracle's javax.json? Or, is Google's version a better option?

推荐答案


我正在尝试学习JSON

I'm trying to learn JSON

有什么可以了解JSON?有对象,数组和值......

What is there to learn about JSON? There are objects, arrays, and values...


我更喜欢坚持使用JSON.ORG版本或Oracle Java javax版本。

I prefer to stick to either the JSON.ORG version or the Oracle Java javax version.

一旦你理解了JSON的结构,为什么首选项很重要,除非你试图维护遗留代码?

Once you understand the structure of JSON, why does preference matter unless you are trying to maintain legacy code?

当Gson或Jackson等其他东西出现时,开发人员经常不再维护他们的项目。只要您熟悉解析JSON的一般概念,库使用就是一个非常自以为是的答案。

Libraries become deprecated and developers often no longer maintain their projects when something else such as Gson or Jackson come along that outshine them. As long as you are familiar with the general concept of parsing JSON, library usage is a heavily opinionated answer.

正如您所发现的那样,JSON.org库不存在,但至少有很多备选方案。

As you've discovered, the JSON.org library is non-existent, but at least there are a long list of alternatives.

Gson和Jackson是受欢迎的,只是因为它们的对象编组功能以及异常处理(例如从一个不存在的密钥获取JSONObject的值) )。

Gson and Jackson are the popular ones simply for their object marshaling capabilities as well as exception handling (such as getting a value from a JSONObject for a key that doesn't exist).

如果你只想要一个简单的,最小的JSON解析库,那么javax.json或json-simple都可以。

If you just want a simple, minimal JSON parsing library, then either javax.json or json-simple are fine.

我在各种项目中使用了上面提到的所有4项,但我提出我的公正意见,你应该只是选择一个图书馆并希望它留在周围并由其开发人员维护。

I have used all 4 mentioned above on a variety of projects, but I am offering my unbiased opinion that you should just pick a library and hope it stays around and is maintained by its developers.

这篇关于哪里有json.org java库消失了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆