File tree 1 file changed +16
-0
lines changed
airbyte-cdk/java/airbyte-cdk/dependencies/src/main/java/io/airbyte/commons/json
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,22 @@ public static JsonNode deserializeExact(final String jsonString) {
117
117
}
118
118
}
119
119
120
+ public static JsonNode deserialize (final byte [] jsonBytes ) {
121
+ try {
122
+ return OBJECT_MAPPER .readTree (jsonBytes );
123
+ } catch (final IOException e ) {
124
+ throw new RuntimeException (e );
125
+ }
126
+ }
127
+
128
+ public static JsonNode deserializeExact (final byte [] jsonBytes ) {
129
+ try {
130
+ return OBJECT_MAPPER_EXACT .readTree (jsonBytes );
131
+ } catch (final IOException e ) {
132
+ throw new RuntimeException (e );
133
+ }
134
+ }
135
+
120
136
public static <T > Optional <T > tryDeserialize (final String jsonString , final Class <T > klass ) {
121
137
try {
122
138
return Optional .of (OBJECT_MAPPER .readValue (jsonString , klass ));
You can’t perform that action at this time.
0 commit comments