diff options
author | Loïc Hoguin <[email protected]> | 2025-02-11 16:56:30 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2025-02-11 16:56:30 +0100 |
commit | 65a77a8f4888ad9266906f351c92477b4c697b18 (patch) | |
tree | 745c265f8dd0b7ab992bedee38d67f197d8c21f5 /examples/file_server/src | |
parent | 761c1f8dca936cd529dbada0b85cd2280ee7dca4 (diff) | |
download | cowboy-65a77a8f4888ad9266906f351c92477b4c697b18.tar.gz cowboy-65a77a8f4888ad9266906f351c92477b4c697b18.tar.bz2 cowboy-65a77a8f4888ad9266906f351c92477b4c697b18.zip |
Use the new json module for the file_server example
Diffstat (limited to 'examples/file_server/src')
-rw-r--r-- | examples/file_server/src/directory_h.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/file_server/src/directory_h.erl b/examples/file_server/src/directory_h.erl index 7d7bd9a..b52fc74 100644 --- a/examples/file_server/src/directory_h.erl +++ b/examples/file_server/src/directory_h.erl @@ -37,7 +37,7 @@ charsets_provided(Req, State) -> list_json(Req, {Path, Fs}) -> Files = [unicode:characters_to_binary(F) || F <- Fs], - {jsx:encode(Files), Req, Path}. + {json:encode(Files), Req, Path}. list_html(Req, {Path, Fs}) -> Body = [[links(Path, unicode:characters_to_binary(F)) || F <- [".."|Fs]]], |