JSON Encoding UserData/DataType Issue (nil value)

Through testing, I’ve noticed that when I encode a value in JSON, “primitive” values are fine, but any userdata/datatype value simply becomes null.

Is there a way to get around this, or am I going to have to code a system to handle every different userdata/datatype type?

Thanks

Edit:

Just learned that all Enums have the Category of “Enum” and Vectors/CFrame/etc all have a Category of “DataType”. It also seems that all DataTypes use DataType.new, and all Enums basically work the same, so I’ll probably be able to make something out of that.

1 Like

Yes. Since they don’t serialize through JSON you will have to make a custom (de) serializer.

1 Like