You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Value#toJson() is expected to return a valid json since its name. Some
valid MessagePack values are invalid in JSON such as ExtensionValue,
non-string keys in a MapValue, NaN or Infinite.
Copy file name to clipboardExpand all lines: msgpack-core/src/main/java/org/msgpack/value/FloatValue.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
18
18
/**
19
19
* The interface {@code FloatValue} represents MessagePack's Float type.
20
-
* <p/>
20
+
*
21
21
* MessagePack's Float type can represent IEEE 754 double precision floating point numbers including NaN and infinity. This is same with Java's {@code double} type.
Copy file name to clipboardExpand all lines: msgpack-core/src/main/java/org/msgpack/value/StringValue.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,9 @@
17
17
18
18
/**
19
19
* The interface {@code StringValue} represents MessagePack's String type.
20
-
* <p/>
20
+
*
21
21
* MessagePack's String type can represent a UTF-8 string at most 2<sup>64</sup>-1 bytes.
22
-
* <p/>
22
+
*
23
23
* Note that the value could include invalid byte sequences. {@code asString()} method throws {@code MessageTypeStringCodingException} if the value includes invalid byte sequence. {@code toJson()} method replaces an invalid byte sequence with <code>U+FFFD replacement character</code>.
Copy file name to clipboardExpand all lines: msgpack-core/src/main/java/org/msgpack/value/Value.java
+34-29Lines changed: 34 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -30,101 +30,101 @@ public interface Value
30
30
{
31
31
/**
32
32
* Returns type of this value.
33
-
* <p/>
33
+
*
34
34
* Note that you can't use <code>instanceof</code> to check type of a value because type of a mutable value is variable.
35
35
*/
36
36
ValueTypegetValueType();
37
37
38
38
/**
39
39
* Returns immutable copy of this value.
40
-
* <p/>
40
+
*
41
41
* This method simply returns <code>this</code> without copying the value if this value is already immutable.
42
42
*/
43
43
ImmutableValueimmutableValue();
44
44
45
45
/**
46
46
* Returns true if type of this value is Nil.
47
-
* <p/>
47
+
*
48
48
* If this method returns true, {@code asNilValue} never throws exceptions.
49
49
* Note that you can't use <code>instanceof</code> or cast <code>((NilValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
50
50
*/
51
51
booleanisNilValue();
52
52
53
53
/**
54
54
* Returns true if type of this value is Boolean.
55
-
* <p/>
55
+
*
56
56
* If this method returns true, {@code asBooleanValue} never throws exceptions.
57
57
* Note that you can't use <code>instanceof</code> or cast <code>((BooleanValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
58
58
*/
59
59
booleanisBooleanValue();
60
60
61
61
/**
62
62
* Returns true if type of this value is Integer or Float.
63
-
* <p/>
63
+
*
64
64
* If this method returns true, {@code asNumberValue} never throws exceptions.
65
65
* Note that you can't use <code>instanceof</code> or cast <code>((NumberValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
66
66
*/
67
67
booleanisNumberValue();
68
68
69
69
/**
70
70
* Returns true if type of this value is Integer.
71
-
* <p/>
71
+
*
72
72
* If this method returns true, {@code asIntegerValue} never throws exceptions.
73
73
* Note that you can't use <code>instanceof</code> or cast <code>((IntegerValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
74
74
*/
75
75
booleanisIntegerValue();
76
76
77
77
/**
78
78
* Returns true if type of this value is Float.
79
-
* <p/>
79
+
*
80
80
* If this method returns true, {@code asFloatValue} never throws exceptions.
81
81
* Note that you can't use <code>instanceof</code> or cast <code>((FloatValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
82
82
*/
83
83
booleanisFloatValue();
84
84
85
85
/**
86
86
* Returns true if type of this value is String or Binary.
87
-
* <p/>
87
+
*
88
88
* If this method returns true, {@code asRawValue} never throws exceptions.
89
89
* Note that you can't use <code>instanceof</code> or cast <code>((RawValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
90
90
*/
91
91
booleanisRawValue();
92
92
93
93
/**
94
94
* Returns true if type of this value is Binary.
95
-
* <p/>
95
+
*
96
96
* If this method returns true, {@code asBinaryValue} never throws exceptions.
97
97
* Note that you can't use <code>instanceof</code> or cast <code>((BinaryValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
98
98
*/
99
99
booleanisBinaryValue();
100
100
101
101
/**
102
102
* Returns true if type of this value is String.
103
-
* <p/>
103
+
*
104
104
* If this method returns true, {@code asStringValue} never throws exceptions.
105
105
* Note that you can't use <code>instanceof</code> or cast <code>((StringValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
106
106
*/
107
107
booleanisStringValue();
108
108
109
109
/**
110
110
* Returns true if type of this value is Array.
111
-
* <p/>
111
+
*
112
112
* If this method returns true, {@code asArrayValue} never throws exceptions.
113
113
* Note that you can't use <code>instanceof</code> or cast <code>((ArrayValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
114
114
*/
115
115
booleanisArrayValue();
116
116
117
117
/**
118
118
* Returns true if type of this value is Map.
119
-
* <p/>
119
+
*
120
120
* If this method returns true, {@code asMapValue} never throws exceptions.
121
121
* Note that you can't use <code>instanceof</code> or cast <code>((MapValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
122
122
*/
123
123
booleanisMapValue();
124
124
125
125
/**
126
126
* Returns true if type of this an Extension.
127
-
* <p/>
127
+
*
128
128
* If this method returns true, {@code asExtensionValue} never throws exceptions.
129
129
* Note that you can't use <code>instanceof</code> or cast <code>((ExtensionValue) thisValue)</code> to check type of a value because
130
130
* type of a mutable value is variable.
@@ -133,7 +133,7 @@ public interface Value
133
133
134
134
/**
135
135
* Returns the value as {@code NilValue}. Otherwise throws {@code MessageTypeCastException}.
136
-
* <p/>
136
+
*
137
137
* Note that you can't use <code>instanceof</code> or cast <code>((NilValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
138
138
*
139
139
* @throws MessageTypeCastException If type of this value is not Nil.
@@ -142,7 +142,7 @@ public interface Value
142
142
143
143
/**
144
144
* Returns the value as {@code BooleanValue}. Otherwise throws {@code MessageTypeCastException}.
145
-
* <p/>
145
+
*
146
146
* Note that you can't use <code>instanceof</code> or cast <code>((BooleanValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
147
147
*
148
148
* @throws MessageTypeCastException If type of this value is not Boolean.
@@ -151,7 +151,7 @@ public interface Value
151
151
152
152
/**
153
153
* Returns the value as {@code NumberValue}. Otherwise throws {@code MessageTypeCastException}.
154
-
* <p/>
154
+
*
155
155
* Note that you can't use <code>instanceof</code> or cast <code>((NumberValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
156
156
*
157
157
* @throws MessageTypeCastException If type of this value is not Integer or Float.
@@ -160,7 +160,7 @@ public interface Value
160
160
161
161
/**
162
162
* Returns the value as {@code IntegerValue}. Otherwise throws {@code MessageTypeCastException}.
163
-
* <p/>
163
+
*
164
164
* Note that you can't use <code>instanceof</code> or cast <code>((IntegerValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
165
165
*
166
166
* @throws MessageTypeCastException If type of this value is not Integer.
@@ -169,7 +169,7 @@ public interface Value
169
169
170
170
/**
171
171
* Returns the value as {@code FloatValue}. Otherwise throws {@code MessageTypeCastException}.
172
-
* <p/>
172
+
*
173
173
* Note that you can't use <code>instanceof</code> or cast <code>((FloatValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
174
174
*
175
175
* @throws MessageTypeCastException If type of this value is not Float.
@@ -178,7 +178,7 @@ public interface Value
178
178
179
179
/**
180
180
* Returns the value as {@code RawValue}. Otherwise throws {@code MessageTypeCastException}.
181
-
* <p/>
181
+
*
182
182
* Note that you can't use <code>instanceof</code> or cast <code>((RawValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
183
183
*
184
184
* @throws MessageTypeCastException If type of this value is not Binary or String.
@@ -187,7 +187,7 @@ public interface Value
187
187
188
188
/**
189
189
* Returns the value as {@code BinaryValue}. Otherwise throws {@code MessageTypeCastException}.
190
-
* <p/>
190
+
*
191
191
* Note that you can't use <code>instanceof</code> or cast <code>((BinaryValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
192
192
*
193
193
* @throws MessageTypeCastException If type of this value is not Binary.
@@ -196,7 +196,7 @@ public interface Value
196
196
197
197
/**
198
198
* Returns the value as {@code StringValue}. Otherwise throws {@code MessageTypeCastException}.
199
-
* <p/>
199
+
*
200
200
* Note that you can't use <code>instanceof</code> or cast <code>((StringValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
201
201
*
202
202
* @throws MessageTypeCastException If type of this value is not String.
@@ -205,7 +205,7 @@ public interface Value
205
205
206
206
/**
207
207
* Returns the value as {@code ArrayValue}. Otherwise throws {@code MessageTypeCastException}.
208
-
* <p/>
208
+
*
209
209
* Note that you can't use <code>instanceof</code> or cast <code>((ArrayValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
210
210
*
211
211
* @throws MessageTypeCastException If type of this value is not Array.
@@ -214,7 +214,7 @@ public interface Value
214
214
215
215
/**
216
216
* Returns the value as {@code MapValue}. Otherwise throws {@code MessageTypeCastException}.
217
-
* <p/>
217
+
*
218
218
* Note that you can't use <code>instanceof</code> or cast <code>((MapValue) thisValue)</code> to check type of a value because type of a mutable value is variable.
219
219
*
220
220
* @throws MessageTypeCastException If type of this value is not Map.
@@ -223,7 +223,7 @@ public interface Value
223
223
224
224
/**
225
225
* Returns the value as {@code ExtensionValue}. Otherwise throws {@code MessageTypeCastException}.
226
-
* <p/>
226
+
*
227
227
* Note that you can't use <code>instanceof</code> or cast <code>((ExtensionValue) thisValue)</code> to check type of a value
0 commit comments