SlideShare a Scribd company logo
Mule ESB
How to convert from Json to Object in 5 minutes
In this tutorial we will be creating an easy json to object converter using mule esb.
Let’s begin creating a simple flow with an http listener, in order to get some json sdata
from some external source:
Now, let’s create a java pojo class, called User, like this:
package com.mulechampion;
import java.io.Serializable;
public class JsonClass implements Serializable{
/**
*
*/
private static final long serialVersionUID = -5645625751838751914L;
private String name;
private String surname;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSurname() {
return surname;
}
public void setSurnme(String surnme) {
this.surname = surnme;
}
@Override
public String toString() {
return "JsonClass [name=" + name + ", surname=" + surname + "]";
}
}
Now we can put our Json to Object transformer in order to get the transformation:
For now, no further configuration is required for the component.
Let’s add the usual Logger component to show the transformation done on the console:
It’s time to start the server and get ready to test the application by calling the flow.
To do this, we will use postman as the http client, to create the request and get the
response.
Configure it like this:
Body (raw):
{
«name» : «usern»,
«surname» : «userns»
}
POST: http//localhost:8081/jsonToObject
Let’s now press «send» and see the result on the console:
Enjoy with the Mule!
HTTP_Listener_Configuration.worker.01]
org.mule.api.processor.LoggerMessageProcessor:
JsonClass [name=usern, surname=users]

More Related Content

PPTX
Mule esb object_to_json
PPTX
Muleesbobjecttojson
PPTX
Mule esb object_to_json
PPTX
Mule esb - How to convert from Json to Object in 5 minutes
PDF
Netty - anfix tech&beers
PDF
ReactiveMongo - non blocking and asynchronous I/O operations
PPTX
Transformation jsontoxmlesb
DOCX
Automation m ysql_and_customer_photo
Mule esb object_to_json
Muleesbobjecttojson
Mule esb object_to_json
Mule esb - How to convert from Json to Object in 5 minutes
Netty - anfix tech&beers
ReactiveMongo - non blocking and asynchronous I/O operations
Transformation jsontoxmlesb
Automation m ysql_and_customer_photo

What's hot (15)

PPTX
DUMP-2013 Serverside - О хранилище “Зебра” - Казаков Александр
DOCX
Configuration of jms jndi
PPTX
Introduction to Node.js
PPTX
How to persist data with Redis
DOC
Qtp compare xml files
PPTX
Json to xml esb transformation
PPT
PDF
Socket.io under the hood
KEY
Socket.io
DOCX
DOCX
Ejercicios vb primer parcial
PPTX
Mapping and listing with mule
DOC
1 serializando y deserializando datos en red
PPTX
Mapping and listing in mule
PPTX
Network teaming
DUMP-2013 Serverside - О хранилище “Зебра” - Казаков Александр
Configuration of jms jndi
Introduction to Node.js
How to persist data with Redis
Qtp compare xml files
Json to xml esb transformation
Socket.io under the hood
Socket.io
Ejercicios vb primer parcial
Mapping and listing with mule
1 serializando y deserializando datos en red
Mapping and listing in mule
Network teaming
Ad

Viewers also liked (15)

DOCX
Ed Brousseau Resume
PDF
Querendo te amar
PDF
Clipping Somepleasures.com 29/01/12 @ IED Barcelona
PPTX
как инвестировать в тмят.инструкция для снг и евросоюза
DOC
Argumentacion sistema educativo lucia prada
PPT
Distributions in R
PPTX
Algoritmo 9 2 invicali 9-b fernando ospina
DOC
DIAGNOSTIC O PRACTICA PEDAGOGICA INV. III A. Cx
DOCX
PPT
PPTX
SMTP MULE
PPT
Projects 2016/2017
ODP
Linux Kernel Crashdump
PPTX
Marketing ethics & social responsibilities
PPT
La tecnología en la educación del siglo xxi
Ed Brousseau Resume
Querendo te amar
Clipping Somepleasures.com 29/01/12 @ IED Barcelona
как инвестировать в тмят.инструкция для снг и евросоюза
Argumentacion sistema educativo lucia prada
Distributions in R
Algoritmo 9 2 invicali 9-b fernando ospina
DIAGNOSTIC O PRACTICA PEDAGOGICA INV. III A. Cx
SMTP MULE
Projects 2016/2017
Linux Kernel Crashdump
Marketing ethics & social responsibilities
La tecnología en la educación del siglo xxi
Ad

Similar to Mule esb json_to_object (20)

PPTX
Mule esb How to convert from Object to Json in 5 minutes
PPTX
Mule esb How to convert from Json to Xml in 5 minutes
PPTX
Mule esb How to use Jackson in Json to Object converter
PPTX
Mule esb object_to_jackson_json
PPTX
Mule esb How to use Jackson in Object to Json converter
PPTX
Mule ESB - How to convert from Xml to Json in 5 minutes
PPTX
Mule esb:DataWeave
PPTX
Mule esb :Data Weave
PPTX
Mule esb
PPTX
Mule esb
PPTX
Mule esb
PPTX
Mule esb
PPTX
Mule esb DataWeave
PPTX
Mule esb dataweave
PPTX
Mule esb Data Weave
 
PPTX
Mule esb
PPTX
Mule esb :Data Weave
PPTX
Mule Esb Data Weave
PPTX
Mule esb How to convert from CSV to Json in 5 minutes
PPTX
Mule: JSON to Object
Mule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutes
Mule esb How to use Jackson in Json to Object converter
Mule esb object_to_jackson_json
Mule esb How to use Jackson in Object to Json converter
Mule ESB - How to convert from Xml to Json in 5 minutes
Mule esb:DataWeave
Mule esb :Data Weave
Mule esb
Mule esb
Mule esb
Mule esb
Mule esb DataWeave
Mule esb dataweave
Mule esb Data Weave
 
Mule esb
Mule esb :Data Weave
Mule Esb Data Weave
Mule esb How to convert from CSV to Json in 5 minutes
Mule: JSON to Object

More from Davide Rapacciuolo (20)

PPTX
Mule esb db_2
PPTX
Mule esb db_1
PPTX
Consuming raml
PPTX
Transf from csv to xml
PPTX
Esb choice flow
PPTX
Xml to xml transformation in mule
PPTX
Transformation xmltoobjectesb
PPTX
Transformation jsontoxmlesb
PPTX
Transformation jsontojsonesb
PPTX
Transformation csvtoxml
PPTX
Rest fullservices
PPTX
Xml to xml transformation in mule
PPTX
Mule esb expression_filter
PPTX
Mule esb collection_splitter
PPTX
Mule esb soap_service
PPTX
Transformation xmltoobjectesb
PPTX
Mule esb csv_to_json
PPTX
Json to json transformation in mule
PPTX
Mule esb file to-string flow
PPTX
My mule esb first http flow
Mule esb db_2
Mule esb db_1
Consuming raml
Transf from csv to xml
Esb choice flow
Xml to xml transformation in mule
Transformation xmltoobjectesb
Transformation jsontoxmlesb
Transformation jsontojsonesb
Transformation csvtoxml
Rest fullservices
Xml to xml transformation in mule
Mule esb expression_filter
Mule esb collection_splitter
Mule esb soap_service
Transformation xmltoobjectesb
Mule esb csv_to_json
Json to json transformation in mule
Mule esb file to-string flow
My mule esb first http flow

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
A Presentation on Touch Screen Technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
1. Introduction to Computer Programming.pptx
PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
August Patch Tuesday
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Assigned Numbers - 2025 - Bluetooth® Document
NewMind AI Weekly Chronicles - August'25-Week II
Building Integrated photovoltaic BIPV_UPV.pdf
A Presentation on Touch Screen Technology
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
A comparative analysis of optical character recognition models for extracting...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Accuracy of neural networks in brain wave diagnosis of schizophrenia
1. Introduction to Computer Programming.pptx
OMC Textile Division Presentation 2021.pptx
Programs and apps: productivity, graphics, security and other tools
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation_ Review paper, used for researhc scholars
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Web App vs Mobile App What Should You Build First.pdf
Heart disease approach using modified random forest and particle swarm optimi...
August Patch Tuesday
Univ-Connecticut-ChatGPT-Presentaion.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Assigned Numbers - 2025 - Bluetooth® Document

Mule esb json_to_object

  • 1. Mule ESB How to convert from Json to Object in 5 minutes
  • 2. In this tutorial we will be creating an easy json to object converter using mule esb. Let’s begin creating a simple flow with an http listener, in order to get some json sdata from some external source: Now, let’s create a java pojo class, called User, like this:
  • 3. package com.mulechampion; import java.io.Serializable; public class JsonClass implements Serializable{ /** * */ private static final long serialVersionUID = -5645625751838751914L; private String name; private String surname; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSurname() { return surname; } public void setSurnme(String surnme) { this.surname = surnme; } @Override public String toString() { return "JsonClass [name=" + name + ", surname=" + surname + "]"; } }
  • 4. Now we can put our Json to Object transformer in order to get the transformation: For now, no further configuration is required for the component. Let’s add the usual Logger component to show the transformation done on the console:
  • 5. It’s time to start the server and get ready to test the application by calling the flow. To do this, we will use postman as the http client, to create the request and get the response. Configure it like this: Body (raw): { «name» : «usern», «surname» : «userns» } POST: http//localhost:8081/jsonToObject
  • 6. Let’s now press «send» and see the result on the console: Enjoy with the Mule! HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor: JsonClass [name=usern, surname=users]