DKJSON - JSON Module for GLua

I have converted dkjson lua module for glua. The primary function of this module is to serialize and serialize Lua tables into strings.

Q & A
How is this any better than VON?

Garry’s Mod already comes with built-in JSON functions(util.TableToJSON, util.JSONToTable). What is the point of this module?



local tbl = {
  Herausgeber= "Xema",
  Nummer= "1234-5678-9012-3456",
  Deckung= 2e+6,
  ["Währung"]= "EUR",
  Inhaber= {
    Name= "Mustermann",
    Vorname= "Max",
    ["männlich"]= true,
    Depot= {},
    Hobbys= { "Reiten", "Golfen", "Lesen" },
    Alter= 42,
    Kinder= {},
    Partner= dkjson.null
local str = dkjson.encode(tbl)
local tbl = dkjson.decode(str)

Original credits go to David Kolf, I just made his module compatible with GLua.

I wanted to make such but ive been always wayyyyy to lazy and did some erroring bullshit, tyvm for this

Uhm, GMod has built-in TableToJSON and JSONToTable functions.

ur kidding right? :suicide:

They aren’t THAT broken, and will be fixed in the next update.

Somebodys gotta fix networking first :v

In other words they’ll be fixed in 6 months
In the meantime this will make a good substitute

You could fix character encoding too :downs:.