local oo    = require "loop.simple"
local json = require "json"
local serializerBase =  require "LuaOrm.Serializers.Base"

--local _JsonEncoder = oo.class({}, serializerBase)
module("LuaOrm.Serializers.Json")

oo.class(_M, serializerBase)

function newArray(self)
    return "[]"
end

function newHash(self)
    return "{}"
end

function AppendNode(self, encodedData, newData, key)
    return json.append(encodedData, newData, key)
end

function Decode(self, data)
    return json.decode(data)
end

function Encode(self, data)
    return json.encode(data)
end
