JSON is lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.
The MGI JSON parser is optimized for speed and programming convenience. It maximizes your ability to move between JSON strings and LabVIEW data types.
This library is more flexible than the built in JSON parser. It handles conversion from almost all LabVIEW data types, and allows you to more easily access data when the exact JSON format isn't known until runtime.
Supported data types are integers, floats, complex, enums, booleans, strings, some refnums, paths, arrays, clusters, timestamps, and nested combinations of these. Unsupported types can be automatically converted to/from string via flatten/unflatten if desired.
See Usage Examples.vi for the most common ways to use the library.
See Contributing.md for information on how to submit pull requests. Bugs can be reported using the repositories issue tracker.
Improved documentation. Added unit tests for parsing, not just formatting. Fixed timestamp formatting unit test. Fixed actual timestamp parsing behavior which was non-functional. Added complex number support.
Always use period as decimal separator for numbers in JSON text (regardless of localization)
Added support for 2D and 3D arrays.
Updated Readme and Relinked VIs
Tweaked access scope and VI properties to solve broken build issues.
Fixed bad links in gpackage.json
Fixed bug when converting a timestamp to an ISO8601 string in non-negative time zones.
Removed UTF converter when on RT.
Fixed NaN/Inf case for numbers.
Copyright (c) 2020 Moore Good Ideas, Inc . All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Moore Good Ideas, Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.