File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -1041,13 +1041,35 @@ public void write(String Text, String charsetName){
10411041 //**************************************************************************
10421042 //** Write XML
10431043 //**************************************************************************
1044- /** Used to write an XML DOM Document to a file.
1044+ /** Used to write an XML DOM Document to a file.
10451045 */
10461046 public void write (org .w3c .dom .Document xml ){
10471047 write (javaxt .xml .DOM .getText (xml ), xml .getXmlEncoding ());
10481048 }
10491049
10501050
1051+ //**************************************************************************
1052+ //** write
1053+ //**************************************************************************
1054+ /** Used to write a JSON object to a file. Note that the JSON object is
1055+ * encoded using UTF-8.
1056+ */
1057+ public void write (javaxt .json .JSONObject json ){
1058+ write (json .toString ().getBytes (java .nio .charset .StandardCharsets .UTF_8 ));
1059+ }
1060+
1061+
1062+ //**************************************************************************
1063+ //** write
1064+ //**************************************************************************
1065+ /** Used to write a JSON array to a file. Note that the JSON array is
1066+ * encoded using UTF-8.
1067+ */
1068+ public void write (javaxt .json .JSONArray arr ){
1069+ write (arr .toString ().getBytes (java .nio .charset .StandardCharsets .UTF_8 ));
1070+ }
1071+
1072+
10511073 //**************************************************************************
10521074 //** Write Text
10531075 //**************************************************************************
You can’t perform that action at this time.
0 commit comments