Difference between revisions of "fcl-json"
From Lazarus wiki
Jump to navigationJump to search (category) |
(Spelling, links to examples) |
||
Line 1: | Line 1: | ||
− | fcl-json - | + | fcl-json - a [[JSON]] (Javascript Object Notation) implementation |
== Notes == | == Notes == | ||
Line 5: | Line 5: | ||
Note: In FPJSON, accessing e.g. SomeJSONObject.Integers['price'] may give a SIGSEGV/Access Violation if that integer variable does not exist. This is apparently intentional, see [http://bugs.freepascal.org/view.php?id=22273] | Note: In FPJSON, accessing e.g. SomeJSONObject.Integers['price'] may give a SIGSEGV/Access Violation if that integer variable does not exist. This is apparently intentional, see [http://bugs.freepascal.org/view.php?id=22273] | ||
− | You'd | + | |
+ | You'd have to use the .Find method (available since FPC 2.6.2) to first check if the element/variable (price in this example) exists. | ||
+ | |||
+ | == Examples == | ||
+ | Example usage can be found in the Lazarus jsonviewer tool. | ||
+ | |||
+ | Also, the [[FPC Applications/Projects Gallery#FPCTwit|fpctwit]] library makes use of JSON to send/receive data. | ||
[[Package List]] | [[Package List]] | ||
Line 11: | Line 17: | ||
[[Category:Packages]] | [[Category:Packages]] | ||
[[Category:Free Component Library]] | [[Category:Free Component Library]] | ||
+ | [[Category:FPC]] |
Revision as of 11:10, 30 July 2013
fcl-json - a JSON (Javascript Object Notation) implementation
Notes
Contains the fpjson JSON manipulation unit.
Note: In FPJSON, accessing e.g. SomeJSONObject.Integers['price'] may give a SIGSEGV/Access Violation if that integer variable does not exist. This is apparently intentional, see [1]
You'd have to use the .Find method (available since FPC 2.6.2) to first check if the element/variable (price in this example) exists.
Examples
Example usage can be found in the Lazarus jsonviewer tool.
Also, the fpctwit library makes use of JSON to send/receive data.