{title:'XML Methodology'}
The following examples show how different data types are represented in XML. They mirror how the data structures are represented in JSON.
The representation of loose (not a direct bean property value) simple types are shown below:
Data type | JSON example | XML |
---|---|---|
string | ||
boolean | ||
integer | 123 | |
float | 1.23 | |
null |
Loose maps and beans use the element
Data type | JSON example | XML |
---|---|---|
| Map<String,String> |
| {
| k1: |
|
| Map<String,Number> |
| {
| k1: 123,
| k2: 1.23,
| k3: |
|
| Map<String,Object> |
| {
| k1: |
Loose collections and arrays use the element
Data type | JSON example | XML |
---|---|---|
| String[] |
| [
| |
|
| Number[] |
| [
| 123,
| 1.23,
| |
|
| Object[] |
| [
| |
|
| String[][] |
| [
| [ |
|
| |
| [ | 123 | ] | |
| |
| [
| |
|
| List<String> |
| [
| |
|
| List<Number> |
| [
| 123,
| 1.23,
| |
|
| List<Object> |
| [
| |
Data type | JSON example | XML |
---|---|---|
| |
| {
| |
Data type | JSON example | XML |
---|---|---|
| |
| {
| |