uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

18.3.2 Available data types

You can specify the following data types for the POJO fields and the Bean property.

Table 18-3 Available data types for the POJO fields and the Bean property (JSON to POJO mapping)

No. Data
1 Primitive int
2 short
3 long
4 float
5 double
6 char
7 byte
8 boolean
9 Wrapper class Integer
10 Short
11 Long
12 Float
13 Double
14 Character
15 Byte
16 Boolean
17 java.lang.String
18 java.math.BigInteger
19 java.math.BigDecimal
20 java.util.Date
21 java.util.Calendar
22 java.lang.Enum
23 POJO#1
24 java.util.List<T>#2
25 java.util.Set<T>#2
26 java.util.Map<K,V>#2
27 Any array in 1 through 26#2,#3

#1
You can recursively have the POJO as a field or a Bean property. For conditions of a supported POJO, see 18.3 JSON to POJO mapping.

#2
The type of T, K, and V can be any item listed in No.1 through 26 in the above table.

#3
The value of the corresponding JSON format must conform to the array structure.

Points to note when setting elements:

Organization of this subsection
(1) int type(primitive)
(2) short type (primitive)
(3) long type (primitive)
(4) float type (primitive)
(5) double type (primitive)
(6) char type (primitive)
(7) byte type (primitive)
(8) boolean type (primitive)
(9) Integer type (wrapper class)
(10) Short type (wrapper class)
(11) Long type (wrapper class)
(12) Float type (wrapper class)
(13) Double type (wrapper class)
(14) Character type (wrapper class)
(15) Byte type (wrapper class)
(16) Boolean type (wrapper class)
(17) java.lang.String type
(18) java.math.BigInteger type, java.math.BigDecimal type
(19) java.util.Datetype, java.util.Calendar type
(20) java.lang.Enum type
(21) java.util.List<T> type
(22) java.util.Set<T> type
(23) java.util.Map<K,V> type

(1) int type(primitive)

(2) short type (primitive)

(3) long type (primitive)

(4) float type (primitive)

(5) double type (primitive)

(6) char type (primitive)

(7) byte type (primitive)

(8) boolean type (primitive)

(9) Integer type (wrapper class)

(10) Short type (wrapper class)

(11) Long type (wrapper class)

(12) Float type (wrapper class)

(13) Double type (wrapper class)

(14) Character type (wrapper class)

(15) Byte type (wrapper class)

(16) Boolean type (wrapper class)

(17) java.lang.String type

(18) java.math.BigInteger type, java.math.BigDecimal type

(19) java.util.Datetype, java.util.Calendar type

(20) java.lang.Enum type

(21) java.util.List<T> type

(22) java.util.Set<T> type

(23) java.util.Map<K,V> type