Lines Matching +refs:encode +refs:escaped +refs:encoding

21   - [encoding json](#convert-an-elixir-dict-into-a-json-string)
36 - [escaped forward slashes](#escaped_forward_slashes)
37 - [escaped strings](#escaped_strings)
44 - [encode and encode!](#encodeterm-opts)
74 iex> JSX.encode %{"library" => "jsx", "awesome" => true}
76 iex> JSX.encode [library: "jsx", awesome: true]
78 iex> JSX.encode ["a","list","of","words"]
167 strings. json must be unicode, but no encoding is specified. javascript
174 unless properly escaped with `\` (`u+005c`)) and that are encoded in `utf8`
191 when encoding, atoms are first converted to BitStrings
228 iex> JSX.encode %Character{name: "Walder Frey", rank: "Lord"}
232 but you don't like that encoding. ok. do this:
243 iex> JSX.encode Character.new(name: "Walder Frey", rank: "Lord")
266 json strings are escaped according to the json spec. this means forward
267 slashes (solidus) are only escaped when this flag is present. otherwise they
291 these codepoints are escaped (to `\u2028` and `\u2029`, respectively) to
297 can result in unwanted behaviour. if your strings are already escaped (or
385 #### `encode(term, opts)` ####
387 `encode` produces takes an elixir term and produces `{:ok, json}` or
406 iex> JSX.encode [true, false, nil]
408 iex> JSX.encode(%{:a => 1, :b => 2, :c => 3}, [{:space, 2}, :indent])
414 iex> JSX.encode(%{:a => 1, :b => 2, :c => 3}, [:space, {:indent, 4}])
422 #### `encode!(json, opts)` ####
424 `encode!` produces takes an elixir term and produces `json` or
427 see [encode](#encodejson-opts) for opts
432 iex> JSX.encode! [true, false, null]
434 iex> JSX.encode! [self()]
443 see [encode](#encodejson-opts) for opts
472 see [encode](#encodejson-opts) for opts