Improve decoding algorithm for Serialized objects. Create test with custom decode function: json