您好,我这边找了个13的环境进行了测试,13中需要写schema和内容,我这边找了个例子,您可以参考一下,其次16版本针对json这方面的实现已比较稳定,而且使用很方便,推荐您使用16版本或者官网的最新版本17,这样使用会更方便。
13API链接:https://help.grapecity.com/activereports/webhelp/AR13/webframe.html#JSONProvider.html
官网:https://www.grapecity.com.cn/developer/activereports
schema:
{"$id":"http://example.com/example.json","type":"object","definitions":{},"$schema":"http://json-schema.org/draft-07/schema#","properties":{"Data":{"$id":"/properties/Data","type":"array","items":{"$id":"/properties/Data/items","type":"object","properties":{"CategoryId":{"$id":"/properties/Data/items/properties/CategoryId","type":"integer","title":"The CategoryId Schema","default":0,"examples":[123]},"CategoryName":{"$id":"/properties/Data/items/properties/CategoryName","type":"string","title":"The CategoryName Schema","default":0,"examples":["abc"]},"Description":{"$id":"/properties/Data/items/properties/Description","type":"string","title":"The Description Schema","default":0,"examples":["abc"]},}}}}} 内容:
{"Data":[{"CategoryId":1,"CategoryName":"Beverages","Description":"Soft drinks, coffees, teas, beers, and ales"},{"CategoryId":2,"CategoryName":"Condiments","Description":"Sweet and savory sauces, relishes, spreads, and seasonings"},{"CategoryId":3,"CategoryName":"Confections","Description":"Desserts, candies, and sweet breads"},{"CategoryId":4,"CategoryName":"Dairy Products","Description":"Cheeses"},{"CategoryId":5,"CategoryName":"Grains/Cereals","Description":"Breads, crackers, pasta, and cereal"},{"CategoryId":6,"CategoryName":"Meat/Poultry","Description":"Prepared meats"},{"CategoryId":7,"CategoryName":"Produce","Description":"Dried fruit and bean curd"},{"CategoryId":8,"CategoryName":"Seafood","Description":"Seaweed and fish"}]}
|