RoSON

I have created a small module that allows you to turn RBX.Lua tables into Folder/*Value hierarchy trees in order to… do stuff. One of the most immediate use cases I can think of is using ROBLOX’s inherent replication system to replicate data, which is more efficient because of its lossyness(?). There are probably other use cases, but here it is:

LINK

One thing it does NOT do is instance serialization. If you try to serialize an object, it will simply leave it out. I may make this if it is requested a ton, but for now, no.

I was just needing something like this a few minutes ago. Thank you.

[strike]It’s offsale[/strike]. Forgot it was a module c:

Just based on the name it looks like you’re trying to play with the name JSON, but JSON stands for
JavaScript Object Notation

I guess I fail to see the use case for this, because actual JSON would be faster (because it encodes C-side).
And you could just use RemoteEvents/RemoteFunctions.

[quote] Just based on the name it looks like you’re trying to play with the name JSON, but JSON stands for
JavaScript Object Notation

I guess I fail to see the use case for this, because actual JSON would be faster (because it encodes C-side).
And you could just use RemoteEvents/RemoteFunctions. [/quote]

Remote*'s ensure data transmission which slogs down network stuff. Using this is not as network intensive for things that you can transmit in a lossy way.

It stands for Roblox Script Object Notation, by the way.

I wrote a script to encode any lua/roblox data type(except userdatas, instances, and functions, of course) into Lua, and then decode that newly encoded string back into it’s lua data type. I could make it open source, if you guys want. It is essentially a lua encoder/decoder. It can’t run lua code(of course), but it can decode pretty much anything.

Or you can use this. Same as the RBXUtility JSON parser but handles userdata. :swag:

What kind of userdata does it support?

What kind of userdata does it support?[/quote]
CFrames, Region3s, Rays, Vector3s, etc.
Only one I could not get was Vector3int16.

What kind of userdata does it support?[/quote]

I’m guessing it supports CFrame, Vector3, Color3, UDim2, Vector2, etc…

What kind of userdata does it support?[/quote]
CFrames, Region3s, Rays, Vector3s, etc.
Only one I could not get was Vector3int16.[/quote]

Oh, I support every one of those. Including Vector3int16, it wasn’t too bad, but Region3int16 support was hard.

Edit: I’m just gonna post mine on here for anybody who wants it. Be warned, however, the code is very long and not at all commented.
https://github.com/KirkyTurky/Lua-Encode-Decode

The point of mine was to turn it into ROBLOX *Value objects. It does that. That’s what it was designed to do. If you need to do that, then use this. That is all.

For basic stats that you don’t have to worry about the client having the most up to date version (e.g. leaderboards), value objects are the way to go.