SlideShare a Scribd company logo
JSON Parser
JSON (JavaScript Object Notation) is a lightweight data-
interchange format. It is easy for humans to read and
write. It is easy for machines to parse and generate. It is
based on a subset of the JavaScript Programming
Language, Standard ECMA-262 3rd Edition - December
1999.
So, there can be different JSON payload ..
One of the simple JSON payload is as follows :-
[
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{
"category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
}
]
You can see the JSON request is formed as a list where the
attributes like "category,"author”,"title“ and "price":
8.95 is repeating in a list….
So how can we parse it and
extract the value of each
components ?????
Now there are various ways to use this new component….
I will show you small examples here
Let us consider following small example:-
Here in this flow we are setting the JSON in set payload component
and extracting the values of each JSON attributes in logger
Corresponding Mule flow will be :-
<flow name="testxmlFlow1" doc:name="testxmlFlow1">
<http:inbound-endpoint address="http://localhost:1081/order" exchange-pattern="request-response"
doc:name="HTTP" doc:description="Process HTTP reqests or responses."/>
<set-payload value="[{ &quot;category&quot;: &quot;reference&quot;,&quot;author&quot;: &quot;Nigel
Rees&quot;,&quot;title&quot;: &quot;Sayings of the Century&quot;,&quot;price&quot;: 8.95},{
&quot;category&quot;: &quot;fiction&quot;,&quot;author&quot;: &quot;Evelyn
Waugh&quot;,&quot;title&quot;: &quot;Sword of Honour&quot;,&quot;price&quot;: 12.99}]"
doc:name="Set Payload"/>
<json:json-to-object-transformer returnClass="java.util.List" doc:name="JSON to List" />
<collection-splitter doc:name="Collection Splitter"/>
<logger message="#[message.payload.category] and #[message.payload.author] and
#[message.payload.title] and #[message.payload.price]" level="INFO" doc:name="Logger"/>
</flow>
Here you can see I have used JSON to List transformer in
the flow :- <json:json-to-object-transformer
returnClass="java.util.List" doc:name="JSON to List" />
We have also used collection splitter to split the values
of the list :-
So, now let run the application and hit the url :-
http://localhost:1081/order to start the application
In the following you can see that the attributes value are
extracted and displayed in logger in Mule console in following
way :-
In next slides I will bring you some more basic concepts of
parsing some more complex JSON payloads

More Related Content

What's hot

Sql Server 2016 and JSON
Sql Server 2016 and JSONSql Server 2016 and JSON
Sql Server 2016 and JSON
Greg McMurray
 
java script json
java script jsonjava script json
java script json
chauhankapil
 
Scalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JSScalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JSCosmin Mereuta
 
Mongo - an intermediate introduction
Mongo - an intermediate introductionMongo - an intermediate introduction
Mongo - an intermediate introduction
nklmish
 
Getting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstreamGetting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstream
Steve Lee
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
Ricardo Silva
 
Introduction To JavaScript
Introduction To JavaScriptIntroduction To JavaScript
Introduction To JavaScript
Reema
 
Qtp compare xml files
Qtp compare xml filesQtp compare xml files
Qtp compare xml filesRamu Palanki
 
Node js first look - 2016
Node js first look - 2016Node js first look - 2016
Node js first look - 2016
Yauheni Nikanovich
 

What's hot (10)

Sql Server 2016 and JSON
Sql Server 2016 and JSONSql Server 2016 and JSON
Sql Server 2016 and JSON
 
java script json
java script jsonjava script json
java script json
 
Scalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JSScalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JS
 
Mongo - an intermediate introduction
Mongo - an intermediate introductionMongo - an intermediate introduction
Mongo - an intermediate introduction
 
Getting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstreamGetting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstream
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
Introduction To JavaScript
Introduction To JavaScriptIntroduction To JavaScript
Introduction To JavaScript
 
Qtp compare xml files
Qtp compare xml filesQtp compare xml files
Qtp compare xml files
 
Node js first look - 2016
Node js first look - 2016Node js first look - 2016
Node js first look - 2016
 
FluentDom
FluentDomFluentDom
FluentDom
 

Viewers also liked

Mule anypoint workday-devkit
Mule  anypoint workday-devkitMule  anypoint workday-devkit
Mule anypoint workday-devkit
vishnukanthro45
 
XYZ Stars y Solar System Pathway, una experiencia museística de divulgación ...
XYZ Stars y Solar System Pathway,  una experiencia museística de divulgación ...XYZ Stars y Solar System Pathway,  una experiencia museística de divulgación ...
XYZ Stars y Solar System Pathway, una experiencia museística de divulgación ...
jdomen44
 
Luis Cernuda Rúbrica de evaluación
Luis Cernuda Rúbrica de evaluación Luis Cernuda Rúbrica de evaluación
Luis Cernuda Rúbrica de evaluación
tomasrodriguezreyes
 
How to make ... Canva
How to make ... CanvaHow to make ... Canva
How to make ... Canva
Joanna Soltysiak
 
Mule security - saml
Mule  security - samlMule  security - saml
Mule security - saml
vishnukanthro45
 
Mulesoft API
Mulesoft APIMulesoft API
Mulesoft API
Kleverton Fortunato
 
MuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation languageMuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation language
fganora
 
παππούα
παππούαπαππούα
παππούα5odimkat
 
Radiografia pulmonar
Radiografia pulmonarRadiografia pulmonar
Radiografia pulmonar
Daniela Samudio
 
Conectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbcConectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbc
Jeison Barros
 
Pautes metodològiques per al treball amb Laboratoris Virtuals
Pautes metodològiques per al treball amb Laboratoris VirtualsPautes metodològiques per al treball amb Laboratoris Virtuals
Pautes metodològiques per al treball amb Laboratoris Virtuals
jdomen44
 
Tugas so
Tugas soTugas so
Tugas so
Zacky Zacky
 
LNG pricing: how to get it right in a volatile energy market
LNG pricing: how to get it right in a volatile energy marketLNG pricing: how to get it right in a volatile energy market
LNG pricing: how to get it right in a volatile energy marketRudolf Huber
 
Messages on "Messenger"
Messages on "Messenger"Messages on "Messenger"
Messages on "Messenger"
Lamia Büşra YEŞİL
 
Activitats CSC i RRI a punt per l'aula: Engaging Science. Mario Barajas.
Activitats CSC i RRI a punt per l'aula: Engaging Science. Mario Barajas.Activitats CSC i RRI a punt per l'aula: Engaging Science. Mario Barajas.
Activitats CSC i RRI a punt per l'aula: Engaging Science. Mario Barajas.
cienciaicontroversia
 
Mule expression language - Part 1
Mule expression language - Part 1Mule expression language - Part 1
Mule expression language - Part 1
Karthik Selvaraj
 
Coltan, fum, texans i vacunes.
Coltan, fum, texans i vacunes.Coltan, fum, texans i vacunes.
Coltan, fum, texans i vacunes.
cienciaicontroversia
 
Development and Launch of the First Ukrainian Nanosatellite "Polytan-1"
Development and Launch of the First Ukrainian Nanosatellite "Polytan-1"Development and Launch of the First Ukrainian Nanosatellite "Polytan-1"
Development and Launch of the First Ukrainian Nanosatellite "Polytan-1"
YSF-2015
 
Gallstones on Ultrasound - Are Gallstones Always Innocent?
Gallstones on Ultrasound - Are Gallstones Always Innocent?Gallstones on Ultrasound - Are Gallstones Always Innocent?
Gallstones on Ultrasound - Are Gallstones Always Innocent?
Radiology Archives
 

Viewers also liked (20)

Mule anypoint workday-devkit
Mule  anypoint workday-devkitMule  anypoint workday-devkit
Mule anypoint workday-devkit
 
XYZ Stars y Solar System Pathway, una experiencia museística de divulgación ...
XYZ Stars y Solar System Pathway,  una experiencia museística de divulgación ...XYZ Stars y Solar System Pathway,  una experiencia museística de divulgación ...
XYZ Stars y Solar System Pathway, una experiencia museística de divulgación ...
 
Luis Cernuda Rúbrica de evaluación
Luis Cernuda Rúbrica de evaluación Luis Cernuda Rúbrica de evaluación
Luis Cernuda Rúbrica de evaluación
 
How to make ... Canva
How to make ... CanvaHow to make ... Canva
How to make ... Canva
 
Mule security - saml
Mule  security - samlMule  security - saml
Mule security - saml
 
Resume of Mahesh Shingala
Resume of Mahesh ShingalaResume of Mahesh Shingala
Resume of Mahesh Shingala
 
Mulesoft API
Mulesoft APIMulesoft API
Mulesoft API
 
MuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation languageMuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation language
 
παππούα
παππούαπαππούα
παππούα
 
Radiografia pulmonar
Radiografia pulmonarRadiografia pulmonar
Radiografia pulmonar
 
Conectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbcConectando seu banco de dados usando jdbc
Conectando seu banco de dados usando jdbc
 
Pautes metodològiques per al treball amb Laboratoris Virtuals
Pautes metodològiques per al treball amb Laboratoris VirtualsPautes metodològiques per al treball amb Laboratoris Virtuals
Pautes metodològiques per al treball amb Laboratoris Virtuals
 
Tugas so
Tugas soTugas so
Tugas so
 
LNG pricing: how to get it right in a volatile energy market
LNG pricing: how to get it right in a volatile energy marketLNG pricing: how to get it right in a volatile energy market
LNG pricing: how to get it right in a volatile energy market
 
Messages on "Messenger"
Messages on "Messenger"Messages on "Messenger"
Messages on "Messenger"
 
Activitats CSC i RRI a punt per l'aula: Engaging Science. Mario Barajas.
Activitats CSC i RRI a punt per l'aula: Engaging Science. Mario Barajas.Activitats CSC i RRI a punt per l'aula: Engaging Science. Mario Barajas.
Activitats CSC i RRI a punt per l'aula: Engaging Science. Mario Barajas.
 
Mule expression language - Part 1
Mule expression language - Part 1Mule expression language - Part 1
Mule expression language - Part 1
 
Coltan, fum, texans i vacunes.
Coltan, fum, texans i vacunes.Coltan, fum, texans i vacunes.
Coltan, fum, texans i vacunes.
 
Development and Launch of the First Ukrainian Nanosatellite "Polytan-1"
Development and Launch of the First Ukrainian Nanosatellite "Polytan-1"Development and Launch of the First Ukrainian Nanosatellite "Polytan-1"
Development and Launch of the First Ukrainian Nanosatellite "Polytan-1"
 
Gallstones on Ultrasound - Are Gallstones Always Innocent?
Gallstones on Ultrasound - Are Gallstones Always Innocent?Gallstones on Ultrasound - Are Gallstones Always Innocent?
Gallstones on Ultrasound - Are Gallstones Always Innocent?
 

Similar to Json parser

Mule parsing with json
Mule parsing with jsonMule parsing with json
Mule parsing with json
Anirban Sen Chowdhary
 
ElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersElasticSearch for .NET Developers
ElasticSearch for .NET Developers
Ben van Mol
 
Expressive objects
Expressive objectsExpressive objects
Expressive objects
Llewellyn Falco
 
AWS CloudFormation Session
AWS CloudFormation SessionAWS CloudFormation Session
AWS CloudFormation Session
Kamal Maiti
 
Basics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examplesBasics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examples
Sanjeev Kumar Jaiswal
 
Json tutorial, a beguiner guide
Json tutorial, a beguiner guideJson tutorial, a beguiner guide
Json tutorial, a beguiner guide
Rafael Montesinos Muñoz
 
Converting with custom transformer part 2
Converting with custom transformer part 2Converting with custom transformer part 2
Converting with custom transformer part 2
Anirban Sen Chowdhary
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
Anirban Sen Chowdhary
 
Json
JsonJson
Elasticsearch And Ruby [RuPy2012]
Elasticsearch And Ruby [RuPy2012]Elasticsearch And Ruby [RuPy2012]
Elasticsearch And Ruby [RuPy2012]Karel Minarik
 
JSON-(JavaScript Object Notation)
JSON-(JavaScript Object Notation)JSON-(JavaScript Object Notation)
JSON-(JavaScript Object Notation)
Skillwise Group
 
Elasticsearch And Apache Lucene For Apache Spark And MLlib
Elasticsearch And Apache Lucene For Apache Spark And MLlibElasticsearch And Apache Lucene For Apache Spark And MLlib
Elasticsearch And Apache Lucene For Apache Spark And MLlib
Jen Aman
 
quick json parser
quick json parserquick json parser
quick json parser
Rajesh Putta
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
guestfd7d7c
 
Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk   Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk
OdessaJS Conf
 
json.ppt download for free for college project
json.ppt download for free for college projectjson.ppt download for free for college project
json.ppt download for free for college project
AmitSharma397241
 
Validating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentationValidating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentation
Dave Stokes
 
Json
JsonJson
Json
manavp
 

Similar to Json parser (20)

Mule parsing with json
Mule parsing with jsonMule parsing with json
Mule parsing with json
 
ElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersElasticSearch for .NET Developers
ElasticSearch for .NET Developers
 
Expressive objects
Expressive objectsExpressive objects
Expressive objects
 
AWS CloudFormation Session
AWS CloudFormation SessionAWS CloudFormation Session
AWS CloudFormation Session
 
Basics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examplesBasics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examples
 
Json
JsonJson
Json
 
Json tutorial, a beguiner guide
Json tutorial, a beguiner guideJson tutorial, a beguiner guide
Json tutorial, a beguiner guide
 
Converting with custom transformer part 2
Converting with custom transformer part 2Converting with custom transformer part 2
Converting with custom transformer part 2
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
 
Json
JsonJson
Json
 
Json
JsonJson
Json
 
Elasticsearch And Ruby [RuPy2012]
Elasticsearch And Ruby [RuPy2012]Elasticsearch And Ruby [RuPy2012]
Elasticsearch And Ruby [RuPy2012]
 
JSON-(JavaScript Object Notation)
JSON-(JavaScript Object Notation)JSON-(JavaScript Object Notation)
JSON-(JavaScript Object Notation)
 
Elasticsearch And Apache Lucene For Apache Spark And MLlib
Elasticsearch And Apache Lucene For Apache Spark And MLlibElasticsearch And Apache Lucene For Apache Spark And MLlib
Elasticsearch And Apache Lucene For Apache Spark And MLlib
 
quick json parser
quick json parserquick json parser
quick json parser
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
 
Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk   Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk
 
json.ppt download for free for college project
json.ppt download for free for college projectjson.ppt download for free for college project
json.ppt download for free for college project
 
Validating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentationValidating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentation
 
Json
JsonJson
Json
 

More from Son Nguyen

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introduction
Son Nguyen
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with mule
Son Nguyen
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overview
Son Nguyen
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filter
Son Nguyen
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
Son Nguyen
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with mule
Son Nguyen
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
Son Nguyen
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
Son Nguyen
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weave
Son Nguyen
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler mule
Son Nguyen
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-bound
Son Nguyen
 
Batch job processing
Batch job processingBatch job processing
Batch job processing
Son Nguyen
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
Son Nguyen
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with mule
Son Nguyen
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connection
Son Nguyen
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in mule
Son Nguyen
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoft
Son Nguyen
 
Jms queue
Jms queueJms queue
Jms queue
Son Nguyen
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
Son Nguyen
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introduction
Son Nguyen
 

More from Son Nguyen (20)

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introduction
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with mule
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overview
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filter
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with mule
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weave
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler mule
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-bound
 
Batch job processing
Batch job processingBatch job processing
Batch job processing
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with mule
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connection
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in mule
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoft
 
Jms queue
Jms queueJms queue
Jms queue
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introduction
 

Recently uploaded

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 

Json parser

  • 2. JSON (JavaScript Object Notation) is a lightweight data- interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999.
  • 3. So, there can be different JSON payload .. One of the simple JSON payload is as follows :- [ { "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99 } ]
  • 4. You can see the JSON request is formed as a list where the attributes like "category,"author”,"title“ and "price": 8.95 is repeating in a list…. So how can we parse it and extract the value of each components ?????
  • 5. Now there are various ways to use this new component…. I will show you small examples here
  • 6. Let us consider following small example:- Here in this flow we are setting the JSON in set payload component and extracting the values of each JSON attributes in logger
  • 7. Corresponding Mule flow will be :- <flow name="testxmlFlow1" doc:name="testxmlFlow1"> <http:inbound-endpoint address="http://localhost:1081/order" exchange-pattern="request-response" doc:name="HTTP" doc:description="Process HTTP reqests or responses."/> <set-payload value="[{ &quot;category&quot;: &quot;reference&quot;,&quot;author&quot;: &quot;Nigel Rees&quot;,&quot;title&quot;: &quot;Sayings of the Century&quot;,&quot;price&quot;: 8.95},{ &quot;category&quot;: &quot;fiction&quot;,&quot;author&quot;: &quot;Evelyn Waugh&quot;,&quot;title&quot;: &quot;Sword of Honour&quot;,&quot;price&quot;: 12.99}]" doc:name="Set Payload"/> <json:json-to-object-transformer returnClass="java.util.List" doc:name="JSON to List" /> <collection-splitter doc:name="Collection Splitter"/> <logger message="#[message.payload.category] and #[message.payload.author] and #[message.payload.title] and #[message.payload.price]" level="INFO" doc:name="Logger"/> </flow>
  • 8. Here you can see I have used JSON to List transformer in the flow :- <json:json-to-object-transformer returnClass="java.util.List" doc:name="JSON to List" /> We have also used collection splitter to split the values of the list :-
  • 9. So, now let run the application and hit the url :- http://localhost:1081/order to start the application
  • 10. In the following you can see that the attributes value are extracted and displayed in logger in Mule console in following way :-
  • 11. In next slides I will bring you some more basic concepts of parsing some more complex JSON payloads