Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

J

An easy way to write json strings inside java 8

Code Example

Simple object

import static com.ericzumba.J.o;

o("a", "b").j();

stands for

{"a": "b"} 

Multiple key value pairs

import static com.ericzumba.J.o;

o("a", "b").and(o("c", "d")).j();

stands for

{"a": "b", "c": "d"} 

Nested object

import static com.ericzumba.J.o;

o("a", 
  o("b", "c"))
.j();

stands for

{"a": 
  {"b": "c"}
}

List

import static com.ericzumba.J.o;
import static java.util.Arrays.asList;

o("a", 
  asList("b", "c"))
.j();

stands for

{"a": 
  ["b", "c"]
}

Supported value types are

  • string
  • integer
  • boolean
  • float
  • nested object
  • single type list

About

easier json templating inside java 8

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages