@@ -886,6 +886,10 @@ Example:
886
886
encoding (usually a ``unicode `` type). This filter was incorrectly-named
887
887
when it was added. ``json_decode_list `` will be supported until the Neon
888
888
release.
889
+ .. deprecated :: 2018.3.3,Fluorine
890
+ The :jinja_ref: `tojson ` filter accomplishes what this filter was designed
891
+ to do, making this filter redundant.
892
+
889
893
890
894
Recursively encodes all string elements of the list to bytes.
891
895
@@ -915,6 +919,9 @@ Returns:
915
919
encoding (usually a ``unicode `` type). This filter was incorrectly-named
916
920
when it was added. ``json_decode_dict `` will be supported until the Neon
917
921
release.
922
+ .. deprecated :: 2018.3.3,Fluorine
923
+ The :jinja_ref: `tojson ` filter accomplishes what this filter was designed
924
+ to do, making this filter redundant.
918
925
919
926
Recursively encodes all string items in the dictionary to bytes.
920
927
@@ -934,6 +941,22 @@ Returns:
934
941
{' a' : ' \xd0\x94 ' }
935
942
936
943
944
+ .. jinja_ref :: tojson
945
+
946
+ ``tojson ``
947
+ ----------
948
+
949
+ .. versionadded :: 2018.3.3,Fluorine
950
+
951
+ Dumps a data structure to JSON.
952
+
953
+ This filter was added to provide this functionality to hosts which have a
954
+ Jinja release older than version 2.9 installed. If Jinja 2.9 or newer is
955
+ installed, then the upstream version of the filter will be used. See the
956
+ `upstream docs `__ for more information.
957
+
958
+ .. __ : http://jinja.pocoo.org/docs/2.10/templates/#tojson
959
+
937
960
.. jinja_ref :: random_hash
938
961
939
962
``random_hash ``
0 commit comments