SlideShare une entreprise Scribd logo
1  sur  77
Télécharger pour lire hors ligne
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JSON	Support	in	Java	EE	8	
	
	
	
Lukas	Jungmann	
JSON-P	EG	Member	
lukas.jungmann@oracle.com	
@jlukas	
	
November	16,	2016
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Safe	Harbor	Statement	
The	following	is	intended	to	outline	our	general	product	direcSon.	It	is	intended	for	
informaSon	purposes	only,	and	may	not	be	incorporated	into	any	contract.	It	is	not	a	
commitment	to	deliver	any	material,	code,	or	funcSonality,	and	should	not	be	relied	upon	
in	making	purchasing	decisions.	The	development,	release,	and	Sming	of	any	features	or	
funcSonality	described	for	Oracle’s	products	remains	at	the	sole	discreSon	of	Oracle.	
2
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 3	
Lukas	Jungmann	
•  So#ware	Developer	@	Oracle	
•  JSON-B	(JSR-367)	EG	member	
•  JSON-P	(JSR-374)	EG	member	
•  JPA	(JSR-338)	Spec	lead	
•  EclipseLink	project	commiJer
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Program	Agenda	
IntroducSon	
JSON	Processing	
JSON	Binding	
Q	&	A	
1	
2	
3	
4	
4
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
IntroducSon	
5
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JSON	Support	in	Java	EE	8	
•  JSON	Processing	API	
– Standard	API	to	parse,	generate,	transform,	query	JSON	
– Object	Model	and	Streaming	API	
•  similar	to	DOM	and	StAX	
•  JSON	Binding	API	
– Binding	JSON	documents	to	Java	objects	
•  similar	to	JAXB	
6
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JSON	Processing	
7
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JsonParser	
•  JsonParser	
– Parses	JSON	in	a	streaming	way	from	input	sources	
– Similar	to	StAX’s	XMLStreamReader,	a	pull	parser	
•  Created	using:	
•  Json.createParser(…),	Json.createParserFactory().createParser(…)	
•  OpSonally,	configured	with	features	
•  Parser	state	events:		
– START_ARRAY,	START_OBJECT,	KEY_NAME,	VALUE_STRING,	VALUE_NUMBER,	
VALUE_TRUE,	VALUE_FALSE,	VALUE_NULL,	END_OBJECT,	END_ARRAY	
8
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 9	
JsonParser	
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 10	
JsonParser	
START_OBJECT!{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 11	
JsonParser	
START_OBJECT!
KEY_NAME!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 12	
JsonParser	
START_OBJECT!
KEY_NAME!
VALUE_STRING!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 13	
JsonParser	
START_OBJECT!
KEY_NAME!
VALUE_STRING!
KEY_NAME!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 14	
JsonParser	
START_OBJECT!
KEY_NAME!
VALUE_STRING!
KEY_NAME!
VALUE_NUMBER!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 15	
JsonParser	
START_OBJECT!
KEY_NAME!
VALUE_STRING!
KEY_NAME!
VALUE_NUMBER!
KEY_NAME!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 16	
JsonParser	
START_OBJECT!
KEY_NAME!
VALUE_STRING!
KEY_NAME!
VALUE_NUMBER!
KEY_NAME!
START_ARRAY!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 17	
JsonParser	
START_OBJECT!
KEY_NAME!
VALUE_STRING!
KEY_NAME!
VALUE_NUMBER!
KEY_NAME!
START_ARRAY!
START_OBJECT!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 18	
JsonParser	
START_OBJECT!
KEY_NAME!
VALUE_STRING!
KEY_NAME!
VALUE_NUMBER!
KEY_NAME!
START_ARRAY!
START_OBJECT!
KEY_NAME, KEY_STRING!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 19	
JsonParser	
START_OBJECT!
KEY_NAME!
VALUE_STRING!
KEY_NAME!
VALUE_NUMBER!
KEY_NAME!
START_ARRAY!
START_OBJECT!
KEY_NAME, KEY_STRING!
KEY_NAME, KEY_STRING!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 20	
JsonParser	
START_OBJECT!
KEY_NAME!
VALUE_STRING!
KEY_NAME!
VALUE_NUMBER!
KEY_NAME!
START_ARRAY!
START_OBJECT!
KEY_NAME, KEY_STRING!
KEY_NAME, KEY_STRING!
END_OBJECT!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 21	
JsonParser	
START_OBJECT!
KEY_NAME!
VALUE_STRING!
KEY_NAME!
VALUE_NUMBER!
KEY_NAME!
START_ARRAY!
START_OBJECT!
KEY_NAME, KEY_STRING!
KEY_NAME, KEY_STRING!
END_OBJECT!
END_ARRAY!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 22	
JsonParser	
START_OBJECT!
KEY_NAME!
VALUE_STRING!
KEY_NAME!
VALUE_NUMBER!
KEY_NAME!
START_ARRAY!
START_OBJECT!
KEY_NAME, KEY_STRING!
KEY_NAME, KEY_STRING!
END_OBJECT!
END_ARRAY!
END_OBJECT!
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 23	
JsonParser	
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
JsonParser p = Json.createParser(...);!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 24	
JsonParser	
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
JsonParser p = Json.createParser(...);!
Event e = p.next(); // START_OBJECT !
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 25	
JsonParser	
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
JsonParser p = Json.createParser(...);!
Event e = p.next(); // START_OBJECT !
parser.next(); // KEY_NAME!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 26	
JsonParser	
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
JsonParser p = Json.createParser(...);!
Event e = p.next(); // START_OBJECT !
parser.next(); // KEY_NAME!
parser.getString(); // name!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 27	
JsonParser	
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
JsonParser p = Json.createParser(...);!
Event e = p.next(); // START_OBJECT !
parser.next(); // KEY_NAME!
parser.getString(); // name!
parser.next(); // VALUE_STRING!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 28	
JsonParser	
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
JsonParser p = Json.createParser(...);!
Event e = p.next(); // START_OBJECT !
parser.next(); // KEY_NAME!
parser.getString(); // name!
parser.next(); // VALUE_STRING!
parser.getString(); // John Doe!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 29	
JsonParser	
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
JsonParser p = Json.createParser(...);!
Event e = p.next(); // START_OBJECT !
parser.next(); // KEY_NAME!
parser.getString(); // name!
parser.next(); // VALUE_STRING!
parser.getString(); // John Doe!
parser.next(); // KEY_NAME!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 30	
JsonParser	
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
JsonParser p = Json.createParser(...);!
Event e = p.next(); // START_OBJECT !
parser.next(); // KEY_NAME!
parser.getString(); // name!
parser.next(); // VALUE_STRING!
parser.getString(); // John Doe!
parser.next(); // KEY_NAME!
parser.getString(); // age!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 31	
JsonParser	
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
JsonParser p = Json.createParser(...);!
Event e = p.next(); // START_OBJECT !
parser.next(); // KEY_NAME!
parser.getString(); // name!
parser.next(); // VALUE_STRING!
parser.getString(); // John Doe!
parser.next(); // KEY_NAME!
parser.getString(); // age!
parser.next(); // VALUE_NUMBER!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 32	
JsonParser	
{!
"name": !
"John Doe", !
"age": !
35,!
"phoneNumbers": !
[!
{ !
"type": "home", !
"number": "123-456-789" !
} !
]!
}!
JsonParser p = Json.createParser(...);!
Event e = p.next(); // START_OBJECT !
parser.next(); // KEY_NAME!
parser.getString(); // name!
parser.next(); // VALUE_STRING!
parser.getString(); // John Doe!
parser.next(); // KEY_NAME!
parser.getString(); // age!
parser.next(); // VALUE_NUMBER!
parser.getInt (); // 35!
!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JsonGenerator	
•  Generates	JSON	in	a	streaming	way	to	output	sources	
– Similar	to	StAX’s	XMLStreamWriter	
•  Created	using:	
– Json.createGenerator(…)	
– Json.createGeneratorFactory().createGenerator(…)	
•  OpSonally,	configured	with	features		
– e.g.	preny	prinSng	
•  Allows	method	chaining	
33
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 34	
JsonGenerator	
JsonGenerator ge=Json.createGenerator(…);!
ge.writeStartArray()!
.writeStartObject()!
.write("type", "home”)!
.write("number", "123-456-789")!
.writeEnd()!
.writeStartObject()!
.write("type", "fax”)!
.write("number", "123-456-790")!
.writeEnd()!
.writeEnd()!
.close();!
[!
{!
"type": "home”,!
"number": "123-456-789"!
},!
{!
"type": "fax”,!
"number": "123-456-790"!
}!
]!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Object	Model	API	
•  Builder	to	build	JsonObject	and	JsonArray	from	scratch	
•  Allows	method	chaining	
•  Type-safe	(cannot	mix	array	and	object	building	methods)	
•  Can	also	use	exisSng	JsonObject	and	JsonArray	in	a	builder	
35
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 36	
Object	Model	API	
JsonArray value = Json.createArrayBuilder()!
.add(Json.createObjectBuilder()!
.add("type", "home")!
.add("number", "123-456-789")!
)!
.add(Json.createObjectBuilder()!
.add("type", "fax")!
.add("number", "123-456-790")!
)!
.build();!
[!
{!
"type": "home”,!
"number": "123-456-789"!
},!
{!
"type": "fax”,!
"number": "123-456-790"!
}!
]!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JSON-P	1.1	
•  Update	JSON-P	spec	to	stay	current	with	emerging	standards	(RFC	7159)	
•  Support	for	IETF	standards	on		
– JSON	Pointer	(RFC	6901)	
– JSON	Patch	(RFC	6902)	
– JSON	Merge	Patch	(RFC	7396)	
•  Add	ediSng/transformaSon	operaSons	to	JSON	objects	and	arrays	
•  Support	for	a	streaming	API,	together	with	Collectors	
•  Support	for	processing	big	JSON,	e.g.	add	filters	to	JSON	parsing.	
37
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JsonPointer	
•  IETF	RFC	6901	
•  String	syntax	for	idenSfying	a	specific	value	
– /phone/mobile	
– /parents/0	
•  Special	characters	
– "/"	—>	"~1"	
– 	"~"	—>	"~0"	
•  Absolute	
38
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JSON	Pointer	Sample	
JsonArray dogs = . . .;!
JsonPointer pointer = !
Json.createPointer("/1/breed");!
JsonValue breed = !
pointer.getValue(dogs);!
p.replace(dogs, !
Json.createValue("English Bulldog"));!
39	
[!
{ !
"name": "Cassidy",!
"breed": "English Bulldog",!
"age": 6!
},!
{ !
"name": "Falco",!
"breed": "Pug",!
"age": 4!
}!
]!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JsonPatch	
•  IETF	RFC	6902	
•  Modify	Parts	of	JSON	document	
•  Patch	is	a	JSON	document	itself	
•  OperaSons:	
– Add,	replace,	remove,	move,	copy,	test	
•  HTTP	PATCH	method	(applicaSon/json-patch+json)	
40
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 41	
JSON	Patch	Sample	
[!
{ "op": "replace",!
"path": "/1/breed",!
"value": "English Bulldog" },!
{ "op": "remove",!
"path": "/2" }!
]!
	
[!
{ !
"name": "Cassidy",!
"breed": "English Bulldog",!
"age": 6!
},!
{ !
"name": "Falco",!
"breed": "Pug",!
"age": 4!
},!
{ !
"name": "Funes",!
"breed": "Frenchie",!
"age": 2!
}!
]!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 42	
JSON	Patch	Sample	
[!
{ "op": "replace",!
"path": "/1/breed",!
"value": "English Bulldog" },!
{ "op": "remove",!
"path": "/2" }!
]!
	
[!
{ !
"name": "Cassidy",!
"breed": "English Bulldog",!
"age": 6!
},!
{ !
"name": "Falco",!
"breed": "English Bulldog",!
"age": 4!
},!
{ !
"name": "Funes",!
"breed": "Frenchie",!
"age": 2!
}!
]!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 43	
JSON	Patch	Sample	
[!
{ "op": "replace",!
"path": "/1/breed",!
"value": "English Bulldog" },!
{ "op": "remove",!
"path": "/2" }!
]!
	
[!
{ !
"name": "Cassidy",!
"breed": "English Bulldog",!
"age": 6!
},!
{ !
"name": "Falco",!
"breed": "English Bulldog",!
"age": 4!
}!
]!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JSON	Binding	
44
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JSON	Binding	
•  API	to	serialize/deserialize	Java	objects	to/from	JSON	documents	
– Similar	to	JAX-B	
– Standardizes	the	current	technologies	(Jackson,	Genson,	Gson)	
•  Default	mapping	between	classes	and	JSON	
•  CustomizaSon	APIs	
– AnnotaSons	(@JsonbProperty,	@JsonbNillable)	
– RunSme	configuraSon	builder	
•  Natural	follow	on	to	JSON-P	
– Closes	the	JSON	support	gap	
– Allows	to	change	providers	
45
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  No	configuraSon,	no	annotaSons	
•  The	scope:	
– Basic	Types	
– Specific	JDK	Types	
– Dates	
– Classes	
– CollecSons/Arrays	
– EnumeraSons	
– JSON-P	
46	
Default	Mapping	
import javax.json.bind.Jsonb;!
import javax.json.bind.JsonbBuilder;!
!
// Create with default config!
Jsonb jsonb = JsonbBuilder.create();!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 47	
JSON-B	Engine	
public interface Jsonb extends AutoCloseable {!
<T> T fromJson(String str, Class<T> type);!
<T> T fromJson(String str, Type runtimeType);!
<T> T fromJson(Reader reader, Class<T> type);!
<T> T fromJson(Reader reader, Type runtimeType);!
<T> T fromJson(InputStream stream, Class<T> type);!
<T> T fromJson(InputStream stream, Type runtimeType);!
!
String toJson(Object object);!
String toJson(Object object, Type runtimeType);!
void toJson(Object object, Writer writer);!
void toJson(Object object, Type runtimeType, Writer writer);!
void toJson(Object object, OutputStream stream);!
void toJson(Object object, Type runtimeType, OutputStream stream);!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
JSON-B	Sample	
48	
Dog dog1 = new Dog();!
dog1.setName("Cassidy");!
dog1.setBreed("English Bulldog");!
dog1.setAge(6);!
!
Dog dog2 = new Dog();!
dog2.setName("Falco");!
dog2.setBreed("English Bulldog");!
dog2.setAge(4);!
!
List<Dog> dogs = new ArrayList<>();!
dogs.add(dog1);!
dogs.add(dog2);!
!
Jsonb jsonb = JsonbBuilder.create();!
jsonb.toJson(dogs);!
[!
{ !
"name": "Cassidy",!
"breed": "English Bulldog",!
"age": 6!
},!
{ !
"name": "Falco",!
"breed": "English Bulldog",!
"age": 4!
}!
]!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Basic	Types	
– java.lang.String	
– java.lang.Character	
– java.lang.Byte	(byte)	
– java.lang.Short	(short)	
– java.lang.Integer	(int)	
– java.lang.Long	(long)	
– java.lang.Float	(float)	
– java.lang.Double	(double)	
– java.lang.Boolean	(boolean)	
Specific	Types	
– java.math.BigInteger	
– java.math.BigDecimal	
– java.net.URL	
– java.net.URI	
– java.uSl.OpSonal	
– java.uSl.OpSonalInt	
– java.uSl.OpSonalLong	
– java.uSl.OpSonalDouble	
49	
Basic	and	Specific	Types
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Date/Time	
50	
java.uSl.Date	 ISO_DATE_TIME	
java.uSl.Calendar,	java.uSl.GregorianCalendar	 ISO_DATE	if	to	Sme	informaSon	present,	otherwise	ISO_DATE_TIME	
Java.uSl.TimeZone,	java.uSl.SimpleTimeZone	 NormalizedCustomId	(see	TimeZone	javadoc)	
java.Sme.Instant	 ISO_INSTANT	
java.Sme.LocalDate	 ISO_LOCAL_DATE	
java.Sme.LocalTime	 ISO_LOCAL_TIME	
java.Sme.LocalDateTime	 ISO_LOCAL_DATE_TIME	
java.Sme.ZonedDateTime	 ISO_ZONED_DATE_TIME	
java.Sme.OffsetDateTime	 ISO_OFFSET_DATE_TIME	
java.Sme.OffsetTime	 ISO_OFFSET_TIME	
java.Sme.ZoneId	 NormalizedZoneId	as	specified	in	ZoneId	javadoc	
java.Sme.ZoneOffset	 NormalizedZoneId	as	specified	in	ZoneOffset	javadoc	
java.Sme.DuraSon	 ISO	8601	seconds	based	representaSon	
java.Sme.Period	 ISO	8601	period	representaSon
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Date/Time	Samples	
51	
// java.util.Date!
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy");!
Date parsedDate = sdf.parse("25.10.2015");!
jsonb.toJson(parsedDate); // ”2015-10-25T00:00:00"!
!
// java.util.Calendar!
Calendar dateCalendar = Calendar.getInstance();!
dateCalendar.clear();!
dateCalendar.set(2015, 10, 25);!
jsonb.toJson(dateCalendar); // ”2015-10-25”!
!
// java.time.Instant!
jsonb.toJson(Instant.parse("2015-10-25T23:00:00Z")); // ”2015-10-25T23:00:00Z”!
!
// java.time.Duration!
jsonb.toJson(Duration.ofHours(5).plusMinutes(4)); // “PT5H4M"!
!
// java.time.Period!
jsonb.toJson(Period.between(!
LocalDate.of(1960, Month.JANUARY, 1),!
LocalDate.of(1970, Month.JANUARY, 1))); // "P10Y"!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Arrays/CollecSons	
•  CollecSon	
•  Map	
•  Set	
•  HashSet	
•  NavigableSet	
•  SortedSet	
•  TreeSet	
•  LinkedHashSet	
•  TreeHashSet	
•  HashMap	
•  NavigableMap	
•  SortedMap	
•  TreeMap	
•  LinkedHashMap	
•  TreeHashMap	
•  List	
•  ArrayList	
•  LinkedList	
•  Deque	
•  ArrayDeque	
•  Queue	
•  PriorityQueue	
•  EnumSet	
•  EnumMap	
52
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  javax.json.JsonArray	
•  javax.json.JsonStructure	
•  javax.json.JsonValue	
•  javax.json.JsonPointer	
•  javax.json.JsonString	
•  javax.json.JsonNumber	
•  javax.json.JsonObject	
53	
JSON-P	Types	
// JsonObject!
JsonBuilderFactory f = !
Json.createBuilderFactory(null);!
!
JsonObject jsonObject = !
f.createObjectBuilder()!
.add(“name", "Jason")!
.add(“city", "Prague")!
.build();!
!
jsonb.toJson(jsonObject); !
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Classes	
•  Public	and	protected	nested	and	staMc	nested	classes	
•  Anonymous	classes	(serializaSon	only)	
•  Inheritance	is	supported	
•  Default	no-argument	constructor	is	required	for	deserializaSon	
54
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Fields	
•  Final	fields	are	serialized	
•  StaMc	fields	are	skipped	
•  Transient	fields	are	skipped	
•  Null	fields	are	skipped	
•  Fields	order	
– Lexicographical	order	
– Parent	class	fields	are	serialized	before	child	class	fields	
55
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
public class Parent {!
public int parentB;!
public int parentA;!
}!
{!
"parentA": 1,!
"parentB": 2!
} !
56	
Fields	Order	Sample
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
public class Parent {!
public int parentB;!
public int parentA;!
}!
!
public class Child extends Parent {!
public int childB;!
public int childA;!
}!
{!
"parentA": 1,!
"parentB": 2!
} !
!
{!
"parentA": 1,!
"parentB": 2,!
!
"childA": 3,!
"childB": 4!
}!
57	
Fields	Order	Sample
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
SerializaMon	
•  ExisSng	fields	with	public	geners	
•  Public	fields	with	no	geners	
•  Public	gener/sener	pair	without	a	
corresponding	field	
•  DeserializaMon	
•  ExisSng	fields	with	public	seners	
•  Public	fields	with	no	seners	
•  Public	gener/sener	pair	without	a	
corresponding	field	
58	
Scope	and	Field	Access	Strategy
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
public class Foo {!
public final int publicFinalField;!
private final int privateFinalField;!
!
public static int publicStaticField; !
!
public int publicWithNoGetter;!
public int publicWithPrivateGetter;!
public Integer publicNullField = null;!
!
private int privateWithNoGetter;!
private int privateWithPublicGetter;!
!
public int getNoField() {};!
public void setNoField(int value) {};!
}!
{ !
"publicFinalField": 1,!
!
!
!
!
"publicWithNoGetter": 1,!
!
!
!
!
"privateWithPublicGetter": 1,!
!
"noField": 1!
}!
	
59	
Scope	and	Field	Access	Strategy
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  AnnotaSons	
•  RunSme	configuraSon	
– JsonbConfig	
– JsonbBuilder	
60	
JSON-B	Engine	ConfiguraSon	
JsonbConfig config = new JsonbConfig()!
.withFormatting(…)!
.withNullValues(…)!
.withEncoding(…)!
.withStrictIJSON(…)!
.withPropertyNamingStrategy(…)!
.withPropertyOrderStrategy(…)!
.withPropertyVisibilityStrategy(…)!
.withAdapters(…)!
.withBinaryDataStrategy(…);!
!
Jsonb jsonb = JsonbBuilder.newBuilder()!
.withConfig(…)!
.withProvider(…)!
.build();!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	 61	
CustomizaSons	
•  Property	names	
•  Property	order	
•  Ignoring	properSes	
•  Null	handling	
•  Custom	instanSaSon	
•  Fields	visibility	
•  Adapters	
•  Date/Number	Formats	
•  Binary	Encoding
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  AnnotaSon	
– @JsonbProperty	
•  Scope:	
– Field	
– Gener/Sener	
– Parameter	
62	
Property	Names	
public class Customer {!
private int id;!
!
@JsonbProperty("name")!
private String firstName;!
}!
!
public class Customer {!
public int id;!
public String firstName;!
!
@JsonbProperty("name")!
public String getFirstName() {!
return firstName;!
}!
}!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Property	Naming	Strategy	
•  Supported	naming	strategies	
– IDENTITY	(myMixedCaseProperty)	
– LOWER_CASE_WITH_DASHES	(my-mixed-case-property)	
– LOWER_CASE_WITH_UNDERSCORES	(my_mixed_case_property)	
– UPPER_CAMEL_CASE	(MyMixedCaseProperty)	
– UPPER_CAMEL_CASE_WITH_SPACES	(My	Mixed	Case	Property)	
– CASE_INSENSITIVE	(mYmIxEdCaSePrOpErTy)	
– Or	a	custom	implementaSon	
•  JsonbConfig	
– withPropertyNamingStrategy(…):	
63
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  Strategies:	
– LEXICOGRAPHICAL	(A-Z)	
– ANY	
– REVERSE	(Z-A)	
•  AnnotaSon	
– @JsonbPropertyOrder	on	class	
•  JsonbConfig	
– withPropertyOrderStrategy(…)	
64	
Property	Order	Strategy	
@JsonbPropertyOrder(ANY)!
public class Foo {!
public int bar2;!
public int bar1;!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  AnnotaSon	
– @JsonbTransient	
65	
Ignoring	ProperSes	
public class Customer {!
public int id;!
public String name;!
!
@JsonbTransient!
public BigDecimal salary;!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  PropertyVisibilityStrategy	
interface	
•  AnnotaSon	
– @JsonbVisibility	
•  JsonbConfig	
– withPropertyVisibilityStrategy(…)	
66	
Property	Visibility	
public interface PropertyVisibilityStrategy {!
boolean isVisible(Field field);!
boolean isVisible(Method method);!
}!
!
public class MuStrategy implements!
PropertyVisibilityStrategy {!
/* ... */!
}!
!
@JsonbVisibility(MyStrategy.class)!
public class Bar {!
private int field1;!
private int field2;!
}!
!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  Null	fields	are	skipped	by	default	
•  AnnotaSon	
– @JsonbNillable	
•  JsonbConfig	
– withNullValues(true)	
67	
Null	Handling	
public class Customer {!
public int id = 1;!
!
@JsonbNillable!
public String name = null;!
}!
!
@JsonbNillable!
public class Customer {!
public int id = 1;!
public String name = null;!
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
public class Customer {!
public int id;!
public String name;!
!
@JsonbCreator!
public static Customer getFromDb(int id) {!
return CustomerDao.getByPrimaryKey(id);!
}!
}!
!
public class Order {!
public int id;!
public Customer customer;!
}!
!
!
!
!
!
!
!
!
!
!
{!
"id": 123,!
"customer": {!
"id": 562,!
}!
} !
!
68	
Custom	InstanSaSon
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  AnnotaSons	
– @JsonbDateFormat	
– @JsonbNumberFormat	
•  JsonbConfig	
– withDateFormat(…)	
– withLocale(…)	
69	
Date/Number	Format	
public class FormatSample { !
public Date defaultDate; !
!
@JsonbDateFormat("dd.MM.yyyy")!
public Date formattedDate; !
!
public BigDecimal defaultNumber; !
!
@JsonbNumberFormat(“#0.00")!
public BigDecimal formattedNumber; !
}!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  Supported	encodings	
– BYTE	(default)	
– BASE_64	
– BASE_64_URL	
•  JsonbConfig	
– withBinaryDataStrategy(…)	
70	
Binary	Data	Encoding	
JsonbConfig config = new JsonbConfig()!
.withBinaryDataStrategy(!
BinaryDataStrategy.BASE_64);!
!
Jsonb jsonb = JsonbBuilder.create(config);!
String json = jsonb.toJson(obj);!
!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
I-JSON	
•  I-JSON	(”Internet	JSON”)	is	a	restricted	profile	of	JSON	
– hnps://tools.iez.org/html/dra{-iez-json-i-json-06	
•  JSON-B	fully	supports	I-JSON	by	default	with	three	excepSons:	
– JSON	Binding	does	not	restrict	the	serializaSon	of	top-level	JSON	texts	that	are	
neither	objects	nor	arrays.	The	restricSon	should	happen	at	applicaSon	level.	
– JSON	Binding	does	not	serialize	binary	data	with	base64url	encoding.	
– JSON	Binding	does	not	enforce	addiSonal	restricSons	on	dates/Smes/duraSon.	
•  JsonbConfig	
– withStrictIJSON(true)	
71
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  Inspired	by	JAXB	
•  AnnotaSons	
– @JsonbTypeAdapter	annotaSon	
•  JsonbConfig	
– withAdapters(…)	
72	
Adapters	
public interface JsonbAdapter<Original, Adapted> {!
Adapted adaptToJson(Original obj);!
Original adaptFromJson(Adapted obj);!
}!
!
@JsonbTypeAdapter(AnimalAdapter.class)!
public Animal animal;!
!
JsonbConfig config = new JsonbConfig()!
.withAdapters(new AnimalAdapter());!
!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
•  Low	level	control	on	
serializaSon/deserializaSon	
•  AnnotaSons	
– @JsonbTypeSerializer	
– @JsonbTypeDeserializer	
•  JsonbConfig	
– withSerializers(…)	
– withDeserializers(…)	
73	
Serializers/Deserializers	
public interface JsonbSerializer<T> {!
void serialize(T obj, JsonGenerator generator,!
SerializationContext ctx);!
!
public interface JsonbDeserializer<T> {!
T deserialize(JsonParser parser, !
DeserializationContext ctx, Type rtType);!
}!
!
@JsonbTypeSerializer(AnimalSerializer.class)!
@JsonbTypeDeserializer(AnimalDeserializer.class) !
public Animal animal;!
!
JsonbConfig config = new JsonbConfig()!
.withSerializers(new AnimalSerializer())!
.withDeserializers(new AnimalDeserializer());!
!
!
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
References	
•  JSON-P	specificaSon:	
– hnps://json-processing-spec.java.net/	
•  JSON-P	reference	implementaSon:	
– hnps://jsonp.java.net/	
•  JSON-B:	
– hnp://json-b.net/	
74
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Q	&	A	
75
Copyright	©	2016,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Thank	you!	
76
Java EE 8 JSON Support with JsonParser Streaming API

Contenu connexe

Tendances

Java EE 8 - February 2017 update
Java EE 8 - February 2017 updateJava EE 8 - February 2017 update
Java EE 8 - February 2017 updateDavid Delabassee
 
JSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworksJSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworksDmitry Kornilov
 
Java EE 7 (Lyon JUG & Alpes JUG - March 2014)
Java EE 7 (Lyon JUG & Alpes JUG  - March 2014)Java EE 7 (Lyon JUG & Alpes JUG  - March 2014)
Java EE 7 (Lyon JUG & Alpes JUG - March 2014)David Delabassee
 
Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)Logico
 
Jfokus 2017 Oracle Dev Cloud and Containers
Jfokus 2017 Oracle Dev Cloud and ContainersJfokus 2017 Oracle Dev Cloud and Containers
Jfokus 2017 Oracle Dev Cloud and ContainersMika Rinne
 
What's coming in Java EE 8
What's coming in Java EE 8What's coming in Java EE 8
What's coming in Java EE 8David Delabassee
 
Using Edition-Based Redefinition for Zero Downtime PL/SQL Changes
Using Edition-Based Redefinition for Zero Downtime PL/SQL ChangesUsing Edition-Based Redefinition for Zero Downtime PL/SQL Changes
Using Edition-Based Redefinition for Zero Downtime PL/SQL ChangesChris Saxon
 
Java: Create The Future Keynote
Java: Create The Future KeynoteJava: Create The Future Keynote
Java: Create The Future KeynoteSimon Ritter
 
APEX Office Hours Interactive Grid Deep Dive
APEX Office Hours Interactive Grid Deep DiveAPEX Office Hours Interactive Grid Deep Dive
APEX Office Hours Interactive Grid Deep DiveJohnSnyders
 
Future of Java & You Latin America 2018
Future of Java & You Latin America 2018Future of Java & You Latin America 2018
Future of Java & You Latin America 2018Heather VanCura
 
UKOUG Tech15 - Going Full Circle - Building a native JSON Database API
UKOUG Tech15 - Going Full Circle - Building a native JSON Database APIUKOUG Tech15 - Going Full Circle - Building a native JSON Database API
UKOUG Tech15 - Going Full Circle - Building a native JSON Database APIMarco Gralike
 
Adopt-a-JSR for JSON Processing 1.1, JSR 374
Adopt-a-JSR for JSON Processing 1.1, JSR 374Adopt-a-JSR for JSON Processing 1.1, JSR 374
Adopt-a-JSR for JSON Processing 1.1, JSR 374Heather VanCura
 
Oracle Database features every developer should know about
Oracle Database features every developer should know aboutOracle Database features every developer should know about
Oracle Database features every developer should know aboutgvenzl
 
Oracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web ServicesOracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web ServicesJeff Smith
 
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX LondonJAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX LondonArun Gupta
 

Tendances (20)

JAX-RS 2.1 Reloaded
JAX-RS 2.1 ReloadedJAX-RS 2.1 Reloaded
JAX-RS 2.1 Reloaded
 
REST in an Async World
REST in an Async WorldREST in an Async World
REST in an Async World
 
Java EE 8 - February 2017 update
Java EE 8 - February 2017 updateJava EE 8 - February 2017 update
Java EE 8 - February 2017 update
 
JSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworksJSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworks
 
Java EE 7 (Lyon JUG & Alpes JUG - March 2014)
Java EE 7 (Lyon JUG & Alpes JUG  - March 2014)Java EE 7 (Lyon JUG & Alpes JUG  - March 2014)
Java EE 7 (Lyon JUG & Alpes JUG - March 2014)
 
Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)
 
Jfokus 2017 Oracle Dev Cloud and Containers
Jfokus 2017 Oracle Dev Cloud and ContainersJfokus 2017 Oracle Dev Cloud and Containers
Jfokus 2017 Oracle Dev Cloud and Containers
 
What's coming in Java EE 8
What's coming in Java EE 8What's coming in Java EE 8
What's coming in Java EE 8
 
Using Edition-Based Redefinition for Zero Downtime PL/SQL Changes
Using Edition-Based Redefinition for Zero Downtime PL/SQL ChangesUsing Edition-Based Redefinition for Zero Downtime PL/SQL Changes
Using Edition-Based Redefinition for Zero Downtime PL/SQL Changes
 
JavaCro'15 - Java Certification – in theory and practice - Branko Mihaljević,...
JavaCro'15 - Java Certification – in theory and practice - Branko Mihaljević,...JavaCro'15 - Java Certification – in theory and practice - Branko Mihaljević,...
JavaCro'15 - Java Certification – in theory and practice - Branko Mihaljević,...
 
Java: Create The Future Keynote
Java: Create The Future KeynoteJava: Create The Future Keynote
Java: Create The Future Keynote
 
APEX Office Hours Interactive Grid Deep Dive
APEX Office Hours Interactive Grid Deep DiveAPEX Office Hours Interactive Grid Deep Dive
APEX Office Hours Interactive Grid Deep Dive
 
Future of Java & You Latin America 2018
Future of Java & You Latin America 2018Future of Java & You Latin America 2018
Future of Java & You Latin America 2018
 
UKOUG Tech15 - Going Full Circle - Building a native JSON Database API
UKOUG Tech15 - Going Full Circle - Building a native JSON Database APIUKOUG Tech15 - Going Full Circle - Building a native JSON Database API
UKOUG Tech15 - Going Full Circle - Building a native JSON Database API
 
Web Application Defences
Web Application DefencesWeb Application Defences
Web Application Defences
 
Adopt-a-JSR for JSON Processing 1.1, JSR 374
Adopt-a-JSR for JSON Processing 1.1, JSR 374Adopt-a-JSR for JSON Processing 1.1, JSR 374
Adopt-a-JSR for JSON Processing 1.1, JSR 374
 
Oracle Database features every developer should know about
Oracle Database features every developer should know aboutOracle Database features every developer should know about
Oracle Database features every developer should know about
 
HTTP/2 comes to Java
HTTP/2 comes to JavaHTTP/2 comes to Java
HTTP/2 comes to Java
 
Oracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web ServicesOracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web Services
 
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX LondonJAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
 

Similaire à Java EE 8 JSON Support with JsonParser Streaming API

JSON Support in Java EE 8
JSON Support in Java EE 8JSON Support in Java EE 8
JSON Support in Java EE 8Dmitry Kornilov
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]David Buck
 
Oracle Fusion - Core HR - Manager Experience
Oracle Fusion - Core HR - Manager ExperienceOracle Fusion - Core HR - Manager Experience
Oracle Fusion - Core HR - Manager Experiencessuserce1bac1
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]David Buck
 
Japanese Introduction to Oracle JET
Japanese Introduction to Oracle JETJapanese Introduction to Oracle JET
Japanese Introduction to Oracle JETGeertjan Wielenga
 
OOW16 - Oracle E-Business Suite Integration Best Practices [CON6709]
OOW16 - Oracle E-Business Suite Integration Best Practices [CON6709]OOW16 - Oracle E-Business Suite Integration Best Practices [CON6709]
OOW16 - Oracle E-Business Suite Integration Best Practices [CON6709]vasuballa
 
Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pavel Bucek
 
SkiPHP -- Database Basics for PHP
SkiPHP -- Database Basics for PHP SkiPHP -- Database Basics for PHP
SkiPHP -- Database Basics for PHP Dave Stokes
 
Oracle Fusion - Core HR - Employee Experience
Oracle Fusion - Core HR - Employee ExperienceOracle Fusion - Core HR - Employee Experience
Oracle Fusion - Core HR - Employee Experiencessuserce1bac1
 
Performance in Spark 2.0, PDX Spark Meetup 8/18/16
Performance in Spark 2.0, PDX Spark Meetup 8/18/16Performance in Spark 2.0, PDX Spark Meetup 8/18/16
Performance in Spark 2.0, PDX Spark Meetup 8/18/16pdx_spark
 
Java @ Rio Meetup #1 - Java @ Oracle Cloud
Java @ Rio Meetup #1 - Java @ Oracle CloudJava @ Rio Meetup #1 - Java @ Oracle Cloud
Java @ Rio Meetup #1 - Java @ Oracle CloudPaulo Alberto Simoes ∴
 
Java API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and updateJava API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and updateMartin Grebac
 
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...vasuballa
 
Developers vs DBA's - APACOUC webinar 2017
Developers vs DBA's - APACOUC webinar 2017Developers vs DBA's - APACOUC webinar 2017
Developers vs DBA's - APACOUC webinar 2017Connor McDonald
 
3° Sessione Oracle - CRUI: Mobile&Conversational Interface
3° Sessione Oracle - CRUI: Mobile&Conversational Interface3° Sessione Oracle - CRUI: Mobile&Conversational Interface
3° Sessione Oracle - CRUI: Mobile&Conversational InterfaceJürgen Ambrosi
 
Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_aioughydchapter
 
Web protocols for java developers
Web protocols for java developersWeb protocols for java developers
Web protocols for java developersPavel Bucek
 

Similaire à Java EE 8 JSON Support with JsonParser Streaming API (20)

JSON Support in Java EE 8
JSON Support in Java EE 8JSON Support in Java EE 8
JSON Support in Java EE 8
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
 
Oracle Fusion - Core HR - Manager Experience
Oracle Fusion - Core HR - Manager ExperienceOracle Fusion - Core HR - Manager Experience
Oracle Fusion - Core HR - Manager Experience
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
 
The History of AskTOM
The History of AskTOMThe History of AskTOM
The History of AskTOM
 
Japanese Introduction to Oracle JET
Japanese Introduction to Oracle JETJapanese Introduction to Oracle JET
Japanese Introduction to Oracle JET
 
OOW16 - Oracle E-Business Suite Integration Best Practices [CON6709]
OOW16 - Oracle E-Business Suite Integration Best Practices [CON6709]OOW16 - Oracle E-Business Suite Integration Best Practices [CON6709]
OOW16 - Oracle E-Business Suite Integration Best Practices [CON6709]
 
Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9
 
SkiPHP -- Database Basics for PHP
SkiPHP -- Database Basics for PHP SkiPHP -- Database Basics for PHP
SkiPHP -- Database Basics for PHP
 
Oracle Fusion - Core HR - Employee Experience
Oracle Fusion - Core HR - Employee ExperienceOracle Fusion - Core HR - Employee Experience
Oracle Fusion - Core HR - Employee Experience
 
Performance in Spark 2.0, PDX Spark Meetup 8/18/16
Performance in Spark 2.0, PDX Spark Meetup 8/18/16Performance in Spark 2.0, PDX Spark Meetup 8/18/16
Performance in Spark 2.0, PDX Spark Meetup 8/18/16
 
Java @ Rio Meetup #1 - Java @ Oracle Cloud
Java @ Rio Meetup #1 - Java @ Oracle CloudJava @ Rio Meetup #1 - Java @ Oracle Cloud
Java @ Rio Meetup #1 - Java @ Oracle Cloud
 
Java API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and updateJava API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and update
 
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...
OOW16 - Leverage Oracle Integration Cloud Service for Oracle E-Business Suite...
 
Zend2016 dba tutorial
Zend2016 dba tutorialZend2016 dba tutorial
Zend2016 dba tutorial
 
Oracle SQLcl
Oracle SQLcl Oracle SQLcl
Oracle SQLcl
 
Developers vs DBA's - APACOUC webinar 2017
Developers vs DBA's - APACOUC webinar 2017Developers vs DBA's - APACOUC webinar 2017
Developers vs DBA's - APACOUC webinar 2017
 
3° Sessione Oracle - CRUI: Mobile&Conversational Interface
3° Sessione Oracle - CRUI: Mobile&Conversational Interface3° Sessione Oracle - CRUI: Mobile&Conversational Interface
3° Sessione Oracle - CRUI: Mobile&Conversational Interface
 
Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_
 
Web protocols for java developers
Web protocols for java developersWeb protocols for java developers
Web protocols for java developers
 

Dernier

Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxSasikiranMarri
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...kalichargn70th171
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxRTS corp
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdfSteve Caron
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Effort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software ProjectsEffort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software ProjectsDEEPRAJ PATHAK
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxAS Design & AST.
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Key Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery RoadmapKey Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery RoadmapIshara Amarasekera
 

Dernier (20)

Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptx
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Effort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software ProjectsEffort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software Projects
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptx
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Key Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery RoadmapKey Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery Roadmap
 

Java EE 8 JSON Support with JsonParser Streaming API