Skip to content

Commit

Permalink
Removes config JSON writers in 5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
JujuAdams committed Oct 21, 2023
1 parent 55e1075 commit f211b26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 35 deletions.
4 changes: 2 additions & 2 deletions 5.7/config-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

 

## `SnapBufferWriteLooseJSON`
## `SnapBufferWriteConfigJSON`

*Returns:* N/A (`undefined`)

Expand All @@ -45,7 +45,7 @@ The "config JSON" string will be inserted into the buffer at the current "head"

 

## `SnapBufferReadLooseJSON`
## `SnapBufferReadConfigJSON`

*Returns:* Array or struct, the root node of the "config JSON" data

Expand Down
34 changes: 1 addition & 33 deletions 5.8/config-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@

 

## `SnapToConfigJSON`

*Returns:* String, the data encoded as "config JSON"

|Name |Datatype |Purpose |
|----------------------|------------|------------------------------------------------------------------------------------------------------|
|`data` |struct/array|The nested array/struct data to encode |
|`[pretty]` |boolean |Whether to output a "pretty" string, one that uses indentation for easier reading. Defaults to `false`|
|`[alphabetizeStructs]`|boolean |Whether to alphabetize structs by variable name. Defaults to `false` |
|`[accurateFloats]` |boolean |Whether to output floats using a greater number of decimal points. Defaults to `false` |

!> Setting any of the optional arguments to `true` will incur a memory and performance penalty. You will generally only want to turn the optional features on during development.

 

## `SnapFromConfigJSON`

*Returns:* Array or struct, the root node of the "config JSON" data
Expand All @@ -27,25 +12,8 @@

 

## `SnapBufferWriteLooseJSON`

*Returns:* N/A (`undefined`)

|Name |Datatype |Purpose |
|----------------------|------------|------------------------------------------------------------------------------------------------------|
|`buffer` |buffer |The buffer to write the "config JSON" string into |
|`data` |struct/array|The nested array/struct data to encode |
|`[pretty]` |boolean |Whether to output a "pretty" string, one that uses indentation for easier reading. Defaults to `false`|
|`[alphabetizeStructs]`|boolean |Whether to alphabetize structs by variable name. Defaults to `false` |
|`[accurateFloats]` |boolean |Whether to output floats using a greater number of decimal points. Defaults to `false` |

The "config JSON" string will be inserted into the buffer at the current "head" position, as determined by GameMaker's native `buffer_tell()` function.

!> Setting any of the optional arguments to `true` will incur a memory and performance penalty. You will generally only want to turn the optional features on during development.

 

## `SnapBufferReadLooseJSON`
## `SnapBufferReadConfigJSON`

*Returns:* Array or struct, the root node of the "config JSON" data

Expand Down

0 comments on commit f211b26

Please sign in to comment.