From 65a77a8f4888ad9266906f351c92477b4c697b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 11 Feb 2025 16:56:30 +0100 Subject: Use the new json module for the file_server example --- examples/file_server/src/directory_h.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/file_server/src') 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]]], -- cgit v1.2.3