hash.postgres
-pg_hash_bytes
from PostgreSQL sourceshash.murmur3
-MurmurHash3_x86_32
by Austin Applebyhash.crc32
- from libiberty
Original library, documentation
cjson
cjson_safe
A fast and non-destructive Lua library for working with JSON. The JSON document is stored in internal yyjson structures and is not marshalled or unmarshalled to Lua values. Creating JSON arrays is not supported.
yyjson.load
- parses JSON into a read-only readonly objectyyjson.load_mut
- parses JSON into a mutable objectyyjson.new
- creates a new mutable JSON objectyyjson.null
- null constanttostring(v)
- serializes a mutable JSON object to a string
j = yyjson.new() -- create an empty JSON object
j = yyjson.load(json_string) -- load JSON for read-only access (faster)
j = yyjson.load_mut(json_string) -- load JSON for modification
-- access fields
print(j.int32)
print(j.object.nested_object.inner_float)
-- modify fields
j.uuid = nil -- delete
j.boolean = yyjson.null -- overwrite with null
j.newobject = {test = 1, test1 = {test2 = "test"}}
j.array[4] = 8
j.copy = j.object -- copy subtrees
-- serialize to json
tostring(j) -- full document
tostring(j.object) -- document part