(@NotNull String jsonStr, @Nullable Class<T> klass)
| 554 | } |
| 555 | |
| 556 | public static <T> @Nullable T parse(@NotNull String jsonStr, @Nullable Class<T> klass) { |
| 557 | JsonReader jr = JsonReader.local(); |
| 558 | try { |
| 559 | return jr.buf(jsonStr).parse(klass); |
| 560 | } catch (ReflectiveOperationException e) { |
| 561 | throw Task.forceThrow(e); |
| 562 | } finally { |
| 563 | jr.reset(); |
| 564 | } |
| 565 | } |
| 566 | |
| 567 | public static <T> @Nullable T parse(byte @NotNull [] jsonStr, @Nullable Class<T> klass) { |
| 568 | JsonReader jr = JsonReader.local(); |