VBA json parser[z]

http://www.ediy.co.nz/vbjson-json-parser-library-in-vb6-xidc55680.html

VB-JSON: A Visual Basic 6 (VB6) JSON Parser Class Library

66

Introduction to JSON for Visual Basic 6
VB-JSON is a Visual Basic 6 class library for parsing and emitting JSON (Javascript Object Notation) and can handle nested arrays and objects in the data. It does not rely on the JScript engine for parsing.

JSON is a useful and compact format for data interchange between a browser based JavaScript client program and a VB6 based data server, and also for storing structured meta data in a text field. It can also be used as an efficient RPC transport protocol and compresses well using GZip.  The project also includes a fast string builder class for assembling the JSON data string at a high speed.

This software is BSD licenced and is based on an Excel macro found here. Some parsing bugs in the original functions have been fixed and the string builder class improves performance. Also there are some handy utility functions that return a JSON data set from an ADO Recordset or a character delimited string.

VBJSON Download
Download the VB-JSON JSON Parser class and a simple example project from here:

Download VBJSON.zip


Release History
18th April 2009: Initial Release
23rd April 2009: Added JSON file parser button to sample project and a simple error list to show parsing errors rather than using Err.Raise
26th April 2009: 
* Improved JSON parser error handling
* Added // and /* */ comment support
* Added an early implementation of a simple scripting system called JSONscript

18th July 2009: 
* Changed VBJSON.cls to JSON.bas Module to make it a singleton
* Fixed a bug with data containing the / character
* Changed formatNumber function to use Long integers
* Added code for making JSON-RPC calls

1 August 2010
* Fixed a bug in the JSON parser that hangs on a colon character in a key.

16 March 2012
* Thank you to Hynek C for a patch to fix a possible infinite loop in the array/object parser. Please update the JSON.bas module file in your existing projects.

22 May 2012
* Thanks to Nick P for pointing out that CLng/Val is not the best number conversion function for large numbers. The project has been updated to use the CDec function instead.

A contact email address is given in the header of the class if you find any bugs or have suggestions on how to improve this project.

For more information about the uses of JSON and the data format, please refer to the JSON.ORG web site.

Our internal use of JSON has increased not only in the eDIY web design and ecommerce software, but also some embedded microcontroller projects because it is so compact, yet able to encode complex data in very few bytes!

时间: 2024-08-01 12:03:00

VBA json parser[z]的相关文章

Java的Json解析包FastJson使用

阿里巴巴FastJson是一个Json处理工具包,包括“序列化”和“反序列化”两部分,它具备如下特征:速度最快,测试表明,fastjson具有极快的性能,超越任其他的Java Json parser.包括自称最快的JackJson:功能强大,完全支持Java Bean.集合.Map.日期.Enum,支持范型,支持自省:无依赖,能够直接运行在Java SE 5.0以上版本:支持Android:开源 (Apache 2.0) 源码地址:https://github.com/alibaba/fastj

JSON必知必会 观后记

术语 可移植性 平台和系统间传输信息的兼容性. JSON JavaScriptObjectNotation  对象表示法. 数据交换格式 用于不同平台或系统间交换数据的文本. 字面量 字面意思与其想表达的意思完全一致的值. 变量 通过形如X的标识符来表示的,可以修改的一类值. 最大移植性 通过保证数据本身对于平台和系统的兼容性来提供超越数据格式本身的可移植性. 名称-值对 指拥有名称和对应值的属性和特征(也叫键值对). 语法验证 json格式的验证. 一致性验证 关注独特的数据结构验证. JSO

Android 之json解析2

JSON(JavaScript Object Notation) 定义:字符串 键值对 解析方法有JSON,谷歌GSON,阿里巴巴FastJSON 一种轻量级的数据交换格式,具有良好的可读和便于快速编写的特性. 业内主流技术为其提供了完整的解决方案(有点类似于正则表达式,获得了当今大部分语言的支持),从而可以在不同平台间进行数据交换. JSON采用兼容性很高的文本格式,同时也具备类似于C语言体系的行为. Json建构于两种结构: 1.“名称/值”对的集合(A collection of name

超级好用的解析JSON数据的网站

网址 http://json.parser.online.fr/beta/ 效果图 测试数据 {"city":{"id":1816670,"name":"Beijing","coord":{"lon":116.397232,"lat":39.907501},"country":"CN","population"

Json解析之FastJson

1.FastJson介绍 FastJson是阿里巴巴提供的一个Json处理工具包,具有极快的性能,超越任其他的Java Json parser.使用起来非常方便. 2.例程 首先下载fastjson-1.1.27-android.jar包并导入工程中: DataBean.java: package com.heqiang.testactivity; public class DataBean{ private String name; private String url; private St

JSON.stringify()执行出错是如何产生的?

本文和大家分享的主要是JSON.stringify()执行出错相关内容,一起来看看吧,希望对大家学习json有所帮助. Uncaught TypeError: Converting circular structure to JSON 这个错误是执行JSON.stringify() 时抛出的异常信息 JSON.stringify()用于将json格式转换为string格式,与JSON.parser()相辅相成. 两种方式会导致该错误: 1.json格式数据存在循环调用. 举个例子: var ob

fastJson java后台转换json格式数据

什么事JSON? JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式. 易于人阅读和编写.同时也易于机器解析和生成. 它基于JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999的一个子集. JSON采用完全独立于语言的文本格式,但是也使用了类似于C语言家族的习惯(包括C, C++, C#, Java, JavaScript, Perl, Python等

JSON数据解析

Json的全称:JavaScript Object Notation,其本质是一系列键值对的集合. Json建构于两种结构: (1) “名称/值”对的集合,即一个对象. (2) 值的有序列表,即数组. JSON的数据格式 JSON对象是一个无序的“‘名称/值’对”集合: 1个对象以"{}"大括号包围,即“{”(左括号)开始,“}”(右括号)结束. 每个“名称”和"值"之间以“:”冒号分隔; “名称/值" 对之间使用“,”逗号分隔.如: {  “name”:

Android解析中国天气网的Json数据

在Android开发中.一般的APP都是通过获取server端的数据来更新UI.从server获取到的数据能够是Json.它的数据量要比XML要小,这里解析中国天气网上获取的数据,尽管已经不再更新了.但用来学习还是能够的.为了方便我直接到数据通过txt保存到本地,它的数据能够通过这个页面获取:http://m.weather.com.cn/data/101280601.html 文件夹结构 事实上解析也非常easy.关键代码 private void json3() { InputStream