FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java/src/test/java/com/jsoniter/TestNull.java at master · iCodeIN/java · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
iCodeIN
/
java
Public
forked from
json-iterator/java
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
java
/
src
/
test
/
java
/
com
/
jsoniter
/
TestNull.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
114 lines (88 loc) · 2.96 KB
Breadcrumbs
java
/
src
/
test
/
java
/
com
/
jsoniter
/
TestNull.java
Copy path
File metadata and controls
114 lines (88 loc) · 2.96 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
package
com
.
jsoniter
;
import
com
.
jsoniter
.
any
.
Any
;
import
com
.
jsoniter
.
spi
.
DecodingMode
;
import
junit
.
framework
.
TestCase
;
import
java
.
math
.
BigDecimal
;
import
java
.
math
.
BigInteger
;
public
class
TestNull
extends
TestCase
{
static
{
// JsonIterator.setMode(DecodingMode.DYNAMIC_MODE_AND_MATCH_FIELD_STRICTLY);
}
public
static
class
TestObject1
{
public
Boolean
field
;
}
public
void
test_null_as_Boolean
() {
TestObject1
val
=
JsonIterator
.
deserialize
(
"{
\"
field
\"
:null}"
,
TestObject1
.
class
);
assertNull
(
val
.
field
);
}
public
static
class
TestObject2
{
public
Float
field
;
}
public
void
test_null_as_Float
() {
TestObject2
val
=
JsonIterator
.
deserialize
(
"{
\"
field
\"
:null}"
,
TestObject2
.
class
);
assertNull
(
val
.
field
);
}
public
static
class
TestObject3
{
public
Double
field
;
}
public
void
test_null_as_Double
() {
TestObject3
val
=
JsonIterator
.
deserialize
(
"{
\"
field
\"
:null}"
,
TestObject3
.
class
);
assertNull
(
val
.
field
);
}
public
static
class
TestObject4
{
public
Byte
field
;
}
public
void
test_null_as_Byte
() {
TestObject4
val
=
JsonIterator
.
deserialize
(
"{
\"
field
\"
:null}"
,
TestObject4
.
class
);
assertNull
(
val
.
field
);
}
public
static
class
TestObject5
{
public
Character
field
;
}
public
void
test_null_as_Character
() {
TestObject5
val
=
JsonIterator
.
deserialize
(
"{
\"
field
\"
:null}"
,
TestObject5
.
class
);
assertNull
(
val
.
field
);
}
public
static
class
TestObject6
{
public
Short
field
;
}
public
void
test_null_as_Short
() {
TestObject6
val
=
JsonIterator
.
deserialize
(
"{
\"
field
\"
:null}"
,
TestObject6
.
class
);
assertNull
(
val
.
field
);
}
public
static
class
TestObject7
{
public
Integer
field
;
}
public
void
test_null_as_Integer
() {
TestObject7
val
=
JsonIterator
.
deserialize
(
"{
\"
field
\"
:null}"
,
TestObject7
.
class
);
assertNull
(
val
.
field
);
}
public
static
class
TestObject8
{
public
Long
field
;
}
public
void
test_null_as_Long
() {
TestObject8
val
=
JsonIterator
.
deserialize
(
"{
\"
field
\"
:null}"
,
TestObject8
.
class
);
assertNull
(
val
.
field
);
}
public
static
class
TestObject9
{
public
BigDecimal
field
;
}
public
void
test_null_as_BigDecimal
() {
TestObject9
val
=
JsonIterator
.
deserialize
(
"{
\"
field
\"
:null}"
,
TestObject9
.
class
);
assertNull
(
val
.
field
);
}
public
static
class
TestObject10
{
public
BigInteger
field
;
}
public
void
test_null_as_BigInteger
() {
TestObject10
val
=
JsonIterator
.
deserialize
(
"{
\"
field
\"
:null}"
,
TestObject10
.
class
);
assertNull
(
val
.
field
);
}
public
static
class
TestObject11
{
public
Any
field
;
}
public
void
test_null_as_Any
() {
TestObject11
val
=
JsonIterator
.
deserialize
(
"{
\"
field
\"
:null}"
,
TestObject11
.
class
);
assertNull
(
val
.
field
.
object
());
}
}
Back
|
FazBrowse Home
|
New Git URL