SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
JSR 374: JSON-P1.1 EDR1
Webineri
Hakan Özler
İstanbul JUG
ozlerhakan
ozler.hakan [at] gmail.com
İçerik
• JSR 374, JSON-P1.1 Genel Bakış
• Early Draft İncelemesi:
– JsonUtil
– Json (yeni statik üyeler)
– IETFs:
• JsonPointer
• JsonPatch
• JsonMergePatch
– JsonCollectors
Genel Bakış
• JSR 374 :
– Java API’de JSON Processing 1.1 Spesifikasyonu sağlamakta
– Java EE 8 platformunun bir parçası
– Spec Lideri: Kinman Chung, Oracle
javax.json.JsonUtil
utility sınıfı
downcasting söz konusu
sınıf metodu
javax.json.Json
varolan üretici sınıf
örneklemeler
yeni
üyeler
IETF Spesifikasyonları
• JSON Pointer (RFC 6901)
• JSON Patch (RFC 6902)
• JSON Merge Patch (RFC 7386)
JSON Pointer
Pointer imza deseni ile bir JSON dokümanı
içeriğindeki hedef değere ulaşmamızı sağlar.
JSON Pointer Gösterimi
JSON Pointer imzaları
javax.json.JsonPointer
JSON Patch
JSON Patch dokümanı oluşturmayı ve bu
dokümanı bir JSON dokümanı üzerinde
uygulamayı sağlar.
JSON Patch Dokümanı & Operasyonlar
Patch
Dokümanı
Ops
JSON Patch Kullanımı
1. JsonPatch sınıfını bir JsonArray ile örnekleme.
2. JsonPatchBuilder sınıfına başvurma.
javax.json.JsonPatch
JSON Merge Patch
JSON Merge Patch dokümanı ile bir JSON
dokümanı içeriğini değiştirmeyi sağlar.
JSON Merge Patch
Hedef Doküman Merge Patch Doküman Sonuç
{"a":"b"} {"a":"c"} {"a":"c"}
{"a":"b"} {"b":"c"} {"a":"b“,”b”,”c”}
{"a":"b"} {"a":null} {}
{"a":"b", "b":"c"} {"a":null} {"b":"c"}
{"a":["b"]} {"a":"c"} {"a":"c"}
{"a":"c"} {"a":["b"]} {"a":["b"]}
{"a": {
"b": "c“
}
}
{"a": {
"b": "d",
"c": null
}
}
{"a": {
"b": "d“
}
}
{ "a": [ {"b":"c"} ]} {"a": [1]} {"a": [1]}
{“a”:”b”} [1,2] [1,2]
[1,2] {“a” : “b”} { “a” : “b”}
#mergePatch & #diff
javax.json.stream.JsonCollectors
• toJsonArray():
– Stream’deki JsonValue elementlerini bir JsonArray içine ekler.
• toJsonObject(Function key, Function value):
– key-value yardımıyla oluşturulan stream’deki JsonValue elementlerini bir
JsonObject içine ekler.
• groupingBy(Function classifier):
– JsonValue stream elementlerini bir JsonObject içine gruplar.
#toJsonArray
25 yaş ve üstü
kişilerin ismini
ekle
[‘Ali’, ‘Ayşe’]
#toJsonObject
isim/hobi çifti
oluştur
#groupingBy
cinsiyete göre
grupla
Adopt-a-JSR
Faydalı Sayfalar
• Istanbul Java User Group Sayfası
– Facebook: Facebook Sayfası
– Twitter: Twitter Hesabı
• Adopt a JSR - Istanbul JUG GitHub
• Adopt a JSR Program
• Adopt-a-JSR for Java EE
• Adopt-a-JSR/Java EE 8 at Istanbul JUG
• First Look at JSR 374, JSON-P 1.1 EDR
• First Look at JSR 371, MVC 1.0 Spesification and Ozark RI
• JSR 107 – JCache Standardına İlk Bakış
Teşekkürler
Teşekkürler

Más contenido relacionado

Destacado

Destacado (6)

AWS re:Invent 2016: How A Federal Agency Transformed Work and Adopted DevOps ...
AWS re:Invent 2016: How A Federal Agency Transformed Work and Adopted DevOps ...AWS re:Invent 2016: How A Federal Agency Transformed Work and Adopted DevOps ...
AWS re:Invent 2016: How A Federal Agency Transformed Work and Adopted DevOps ...
 
Informe Anual 2015 CSCHASL
Informe Anual 2015 CSCHASLInforme Anual 2015 CSCHASL
Informe Anual 2015 CSCHASL
 
(MBL313) NEW! AWS IoT: Understanding Hardware Kits, SDKs, & Protocols
(MBL313) NEW! AWS IoT: Understanding Hardware Kits, SDKs, & Protocols(MBL313) NEW! AWS IoT: Understanding Hardware Kits, SDKs, & Protocols
(MBL313) NEW! AWS IoT: Understanding Hardware Kits, SDKs, & Protocols
 
Setup Preconfigured Protections on AWS WAF - November 2016 Webinar Series
Setup Preconfigured Protections on AWS WAF - November 2016 Webinar SeriesSetup Preconfigured Protections on AWS WAF - November 2016 Webinar Series
Setup Preconfigured Protections on AWS WAF - November 2016 Webinar Series
 
AWS Services Overview - September 2016 Webinar Series
AWS Services Overview - September 2016 Webinar SeriesAWS Services Overview - September 2016 Webinar Series
AWS Services Overview - September 2016 Webinar Series
 
Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...
Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...
Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...
 

Más de Hakan Özler (6)

Ignite Session | The journey of Multi Stage Builds, Moby Project and LinuxKit
Ignite Session | The journey of Multi Stage Builds, Moby Project and LinuxKit Ignite Session | The journey of Multi Stage Builds, Moby Project and LinuxKit
Ignite Session | The journey of Multi Stage Builds, Moby Project and LinuxKit
 
JavaOne 2017 | JShell: The Ultimate Missing Tool
 JavaOne 2017 | JShell: The Ultimate Missing Tool JavaOne 2017 | JShell: The Ultimate Missing Tool
JavaOne 2017 | JShell: The Ultimate Missing Tool
 
Measuring Aspect-Oriented Software In Practice
Measuring Aspect-Oriented Software In PracticeMeasuring Aspect-Oriented Software In Practice
Measuring Aspect-Oriented Software In Practice
 
GDG Izmir '16 Docker Workshop
GDG Izmir '16 Docker WorkshopGDG Izmir '16 Docker Workshop
GDG Izmir '16 Docker Workshop
 
Deploy a MongoDB Replica Set using Docker
Deploy a MongoDB Replica Set using DockerDeploy a MongoDB Replica Set using Docker
Deploy a MongoDB Replica Set using Docker
 
Spring Data MongoDB Webiner
Spring Data MongoDB WebinerSpring Data MongoDB Webiner
Spring Data MongoDB Webiner
 

JSON-P 1.1 EDR1 Webinar