Fluent-JSON

A fluent builder for Google Gson objects

License

License

Categories

Categories

JSON Data
GroupId

GroupId

org.jglue.fluent-json
ArtifactId

ArtifactId

fluent-json
Last Version

Last Version

2.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

Fluent-JSON
A fluent builder for Google Gson objects
Source Code Management

Source Code Management

https://github.com/BrynCooke/fluent-json

Download fluent-json

How to add to project

<!-- https://jarcasting.com/artifacts/org.jglue.fluent-json/fluent-json/ -->
<dependency>
    <groupId>org.jglue.fluent-json</groupId>
    <artifactId>fluent-json</artifactId>
    <version>2.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.jglue.fluent-json/fluent-json/
implementation 'org.jglue.fluent-json:fluent-json:2.0.3'
// https://jarcasting.com/artifacts/org.jglue.fluent-json/fluent-json/
implementation ("org.jglue.fluent-json:fluent-json:2.0.3")
'org.jglue.fluent-json:fluent-json:jar:2.0.3'
<dependency org="org.jglue.fluent-json" name="fluent-json" rev="2.0.3">
  <artifact name="fluent-json" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.jglue.fluent-json', module='fluent-json', version='2.0.3')
)
libraryDependencies += "org.jglue.fluent-json" % "fluent-json" % "2.0.3"
[org.jglue.fluent-json/fluent-json "2.0.3"]

Dependencies

compile (1)

Group / Artifact Type Version
com.google.code.gson : gson jar 2.2.3

test (1)

Group / Artifact Type Version
junit : junit jar 4.10

Project Modules

There are no modules declared in this project.

fluent-json

A fluent builder for Google Gson

See website for more details http://jglue.org/fluent-json/

<dependency>
  <groupId>org.jglue.fluent-json</groupId>
  <artifactId>fluent-json</artifactId>
  <version>1.0.0</version>
</dependency>
JsonObject jsonObject = 
	JsonBuilderFactory.buildObject()
		.add("prop1", "1")
		.add("prop2", 2)
		.addNull("prop3")
		.add("prop4", (String)null)
		.addObject("prop5")
			.add("np1", 4)
			.end()
		.addArray("prop6")
			.addObject()
				.end()
			.add("ae1")
		.end()
	.getJson();
{
	prop1: "1",
	prop2: 2,
	prop3: null,
	prop4: null,
	prop5: {
			np1: 4
		},
	prop6: [
			{},
			"ae1"
		]
}

Copyright 2013 Bryn Cooke

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Versions

Version
2.0.3
2.0.1
2.0.0
1.0.0