Multiple operations and format conversion methods based on Java and Js for JSON

Source: Internet
Author: User

Multiple operations and format conversion methods based on Java and Js for JSON

Org. JSON package

Http://www.json.org/java/index.html

1. Jsonobject, which uses a hashmap to save all attributes of a JSON object.

2. Jsonarray uses arraylist to save data. JSON is from JavaScript, and array in Javascript is also an object. I don't know how to save this relationship here.

3. Some string-related classes and exception classes.

4. Some tool classes, such as XML and JSON conversion classes, convert HTTP headers and cookies to JSON classes,

 

 

JSON-LIB Based on org. JSON package: the conversion between bean, MAP, collection, Java array, XML and JSON.

Http://json-lib.sourceforge.net/

Http://json-lib.sourceforge.net/usage.html

 

Stringtree JSON: conversion between JSON and Java objects

Http://www.stringtree.org/stringtree-json.html

Three key categories:

  • Jsonreader. Java

  • Jsonwriter. Java

  • Jsonvalidator. Java

Jsonvalidator is used to check the validity of JSON.

Jsonreader converts a JSON string in the correct format into a Java object.

Jsonwriter converts a Java object into a JSON string.

 

Xsltjson: Use XSLT to convert XML to JSON

Http://www.bramstein.nl/xsltjson/

 

Jsont: converts JSON to any other format based on JS and custom rules.

Http://goessner.net/articles/jsont/

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.