Encodes a Luau value as a JSON string.
Tables with sequential integer keys (1 .. n) are encoded as JSON arrays. Tables with string keys are encoded as JSON objects. Nested structures are fully supported.
Set options.pretty to true for indented, human-readable output.
Set options.sortKeys to true to emit object keys in alphabetical order.