Difference between revisions of "JSON DECODE FILE()"

From Lianjapedia
Jump to: navigation, search
(See Also)
 
(3 intermediate revisions by one other user not shown)
Line 3: Line 3:
  
 
==Syntax==
 
==Syntax==
JSON_DECODE_FILE(<expC>)
+
JSON_DECODE_FILE(<expC> [,<expC2>])
  
 
==See Also==
 
==See Also==
[[ACLASS()]], [[ADDPROPERTY()]], [[AMEMBERS()]], [[COMPOBJ()]], [[CREATEOBJECT()]], [[DEFINE CLASS]], [[DISPLAY CLASSES]], [[DODEFAULT()]], [[FOREACH]], [[GETURL()]], [[JSON_DECODE()]], [[JSON_ENCODE()]], [[LIST CLASSES]], [[LOADOBJECT()]], [[NEWOBJECT()]], [[OBJECT()]], [[POSTURL()]], [[PRINT_JSON()]], [[PRINT_HTML()]], [[PRINT_R()]], [[PRINT_XML()]], [[REMOVEPROPERTY()]], [[REQUIRE_ONCE()]], [[SAVEOBJECT()]], [[SQL SELECT]], [[WITH]], [[XML_DECODE_FILE()]]
+
[[ACLASS()]], [[ADDPROPERTY()]], [[AMEMBERS()]], [[COMPOBJ()]], [[CREATEOBJECT()]], [[DEFINE CLASS]], [[DISPLAY CLASSES]], [[DODEFAULT()]], [[FOREACH]], [[GETURL()]], [[JSON_DECODE()]], [[JSON_ENCODE()]], [[LIST CLASSES]], [[LOADOBJECT()]], [[NEWOBJECT()]], [[OBJECT()]], [[POSTURL()]], [[PRINT_JSON()]], [[PRINT_HTML()]], [[PRINT_R()]], [[PRINT_XML()]], [[REMOVEPROPERTY()]], [[REQUIRE_ONCE()]], [[SAVEOBJECT()]], [[SET JSONBOOLEAN]], [[SQL SELECT]], [[WITH]], [[XML_DECODE_FILE()]]
  
 
==Description==
 
==Description==
 
The JSON_DECODE_FILE() function is used to create a dynamic array (object) from the JSON formatted file whose filename is specified in <expC>.
 
The JSON_DECODE_FILE() function is used to create a dynamic array (object) from the JSON formatted file whose filename is specified in <expC>.
 +
 +
The optional parameter <expC2> specifies the character encoding e.g. "1252". If this is specified the text in the file will be converted to UTF8 from the encoding specified.
  
 
==Example==
 
==Example==

Latest revision as of 05:38, 22 February 2023

Purpose

Function to create a dynamic array (object) from a JSON formatted file

Syntax

JSON_DECODE_FILE(<expC> [,<expC2>])

See Also

ACLASS(), ADDPROPERTY(), AMEMBERS(), COMPOBJ(), CREATEOBJECT(), DEFINE CLASS, DISPLAY CLASSES, DODEFAULT(), FOREACH, GETURL(), JSON_DECODE(), JSON_ENCODE(), LIST CLASSES, LOADOBJECT(), NEWOBJECT(), OBJECT(), POSTURL(), PRINT_JSON(), PRINT_HTML(), PRINT_R(), PRINT_XML(), REMOVEPROPERTY(), REQUIRE_ONCE(), SAVEOBJECT(), SET JSONBOOLEAN, SQL SELECT, WITH, XML_DECODE_FILE()

Description

The JSON_DECODE_FILE() function is used to create a dynamic array (object) from the JSON formatted file whose filename is specified in <expC>.

The optional parameter <expC2> specifies the character encoding e.g. "1252". If this is specified the text in the file will be converted to UTF8 from the encoding specified.

Example

filename = geturl("http://www.myserver.com/getsomepage.rsp?name=smith&month=10", 30, array(), "myfilename.json")
myobject = json_decode_file(filename)