Questions tagged [superobject]

The SuperObject JSON library created by Henri Gourvest for Delphi and FreePascal(Lazarus, CodeTyphon, etc)

After Henri Gourvest quitted his involvement in Delphi and shut down his original site, his projects were moved to OpenSource source hosts, mostly onto Google Code.

The very name and design (and usage patterns) may be were influenced by this concept http://communitywiki.org/en/SuperObject

57 questions
0
votes
1 answer

How to access SuperObject object if key contains dots (e.g. Ip address)?

The code fails to access JSON object if it's key contain dots. JSON: "TableTraps": { "1.3.6.1.4.1.100.108.0.3": { "Vars": [ "alarmDescription", "alarmPositionUnit", "alarmChannel" ] }, …
Dr.eel
  • 1,837
  • 3
  • 18
  • 28
0
votes
3 answers

Parse Json with SuperObject Delphi

I am new to JSON. I have the following JSON data and I don't know how to read the transaction object's id and amount values. { "errorCode": 0, "errorMessage": "ok", "platform": 4, "order": { "id": "3425", "description": "test…
Vlad Costin
  • 61
  • 1
  • 10
0
votes
1 answer

simple JSON work: extracting both the key and the value

I have read a bit of JSON work all over the internet. as a noob, expect me to not be as good as some of you at tracking down examples, because I need knowledge to know what to search for to get knowledge. Catch22. ;-) I'm using superobject, seems…
chillum
  • 123
  • 1
  • 10
0
votes
2 answers

How can I tweak SuperObject library to make it behave case-insensitive?

I just find out the hard way that JSON is case sensitive which means that lWeekRecord['TT_WK_ID'] is not the same as lWeekRecord['tt_wk_id'] (lWeekRecord is an ISuperObject). I cannot find anything about case sensitivity in the limited SuperObject…
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
0
votes
1 answer

Error in using SuperObject in Delphi xe7 android Target

The following error occurs when I debug my project by changing the Target platform to Android (SDK.22.3.32 bit) [DCC Error] superobject.pas(601): E2154 Type 'TSuperTableString' needs finalization - not allowed in variant record The following code…
koul
  • 431
  • 2
  • 10
  • 20
0
votes
2 answers

Problems creating the correct JSON file using superobject or DBXJSON

I'm using Delphi XE2, I have this json struct to create: [ { "Email": "laura@yyyy.com", "MobileNumber": "", "MobilePrefix": "", "Name": "Laura", "Fields": [ { "Description":…
0
votes
1 answer

Create an empty OPENARRAY in C++Builder

I'm using C++Builder with SuperObject JSON parser, and trying to construct an array. _di_ISuperObject json = SO("{}"); json->O["data.names"] = SA(ARRAYOFCONST((""))); for (int i=0; i < v.size(); ++i) json->A["data.names"]->S[i] = v[i]; Now, the…
Roddy
  • 66,617
  • 42
  • 165
  • 277
0
votes
1 answer

Fill local array pointing to field of derived class, but later field empty

I must be overlooking something in my web service... Data structures: TResIDNameRec = record id : Integer; name: String; end; TResIDNameArr = array of TResIDNameRec; TResBase = class(TJSONStructure) // just a class(TObject) private public …
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
0
votes
1 answer

How to link design-time TWebActions with a structure of TObjects?

I have a web service with an ever growing number of TWebAction items defined at design time on a TWebModule, and coupled to OnAction events. Requests are HTTP GETs through the URL and responses are 'handcrafted' JSON data, i.e. composed at runtime…
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
-1
votes
1 answer

Read a specific value from a JSON request using SuperObject

Hello I get the next result in a web API in JSON format: [ { "$id":"47", "CodISO":"BIH", "ES":"Bosnia y Herzegovina", "EN":"Bosnia and Herzegovina" }, { "$id":"48", "CodISO":"BLR", …
Juande
  • 73
  • 1
  • 10
-1
votes
1 answer

How to encode output json file (SuperObject)?

I'm using SuperObject library for working with JSON. This code creates JSON: procedure TfmMain.btnIngredientsSaveClick(Sender: TObject); var obj: ISuperObject; i: integer; begin try obj := SO(); for i := 0 to sgIngredients.RowCount - 2 do …
Romowski
  • 1,518
  • 5
  • 25
  • 50
-4
votes
2 answers

How to create a TSuperObject instance by parsing a json array?

This is a valid json: [{"id":1, "name":"foo"}, {"id":2, "name":"bar"}] How do I create a TSuperObject from this string?
EProgrammerNotFound
  • 2,403
  • 4
  • 28
  • 59
1 2 3
4