Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
bungle committed Apr 23, 2016
2 parents 7ca58cb + 3644639 commit 8bf6230
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ Pretty formats the JSON output. You may pass `lf` (line feed) if you want to use
than the default `\n`. If you want to indent (` id` argument) with something else than `\t` (a tab)
you can pass that as arguments as well. And if you want to have something else than ` ` (single space) after
colons `:` (`ac` argument) in json, you can change that as well, try for example `\n`. If you'd like to use
an encoder other than cJSON, pass the encoding function as the 5th argument. It should accept anything as
input parameter, and ff there is a problem with encoding this function should return `nil` and an error
an encoder other than cJSON, pass the encoding function as the 5th argument (`ec`). It should accept anything as
input parameter, and if there is a problem with encoding this function should return `nil` and an error
message, such as:

```lua
nil, "Cannot serialise function: type not supported"
```

For input argument `dt` it accepts anything that `cjson.encode` accepts.
For input argument `dt` it accepts anything that `cjson.encode` accepts (or whatever the custom encoding
function accepts).

##### Example

Expand Down

0 comments on commit 8bf6230

Please sign in to comment.