Revert "chore: simplify deserialization code"

This reverts commit 9f45c2c5b2.
This commit is contained in:
LordMZTE 2022-08-23 17:18:25 +02:00
parent 2a73ee43a5
commit 5619ebebd5
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
const std = @import("std");
const getty = @import("getty");
const json = @import("json");
/// getty deserialization blocks required to properly deserialize messages
@ -24,7 +25,8 @@ pub fn OwnedDeserData(comptime T: type) type {
errdefer arena.deinit();
const arena_alloc = arena.allocator();
const deser_data = try json.fromSliceWith(arena_alloc, T, data, dbs);
var deser = json.Deserializer(dbs).withAllocator(arena_alloc, data);
const deser_data = try getty.deserialize(arena_alloc, T, deser.deserializer());
return Self{
.data = deser_data,