Something went wrong. Try again.
Monorepo for PackTools - tooling for Minecraft Modpacks!
Something went wrong. Try again.
12345678910111213141516171819#pragma once
#include <expected>#include <string>
struct lua_State;
namespace packluau {
/// Appends the Luau value at `index` to `out` as JSON, deterministically: an object's keys sort/// by code point, a whole number below 2^53 prints without a fraction, and anything JSON cannot/// say exactly is refused rather than guessed. A table whose keys are exactly 1..n is an array;/// a table of string keys, or an empty one, is an object; any other table, nil, NaN, an infinity,/// a function, a userdata or invalid UTF-8 is an error naming the offending path.[[nodiscard]] std::expected<void, std::string> write_json(lua_State *state, int index, std::string &out);
} // namespace packluau