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
2
votes
1 answer

Is there a way to parse JSON and trigger events on the spot?

Right now, I'm using SuperObject to parse my JSON data (when receiving it from the server) and then dump it into a client dataset. There can be very large amounts of data coming from the server. Currently, I have to first parse that JSON data into…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
2
votes
2 answers

Why do I get a slew of question marks when I parse a string with SuperObject?

I'm trying to parse this string using SuperObject in Delphi 7. procedure TForm1.btn1Click(Sender: TObject); var obj: ISuperObject; fw:string; begin fw:=…
dudey
  • 87
  • 5
  • 13
2
votes
1 answer

SuperObject Multidimensional array

I'm using Delphi XE4 and SuperObject 1.24 I Have the following structure : type TMyArray = Array of Array of Variant; TMyRecord = Record Values : TMyArray; end; var T,W : TMyRecord; S : String; i : integer; begin SetLength(T.Values,…
Clément
  • 91
  • 6
2
votes
2 answers

Store Array of Record in JSON

How can an array of record be stored in JSON via SuperObject library. For example.. type TData = record str: string; int: Integer; bool: Boolean; flt: Double; end; var DataArray: Array[0..100] of TData;
user299323
  • 55
  • 2
  • 8
2
votes
1 answer

using SuperObject to call procedure inside a Class

i'm trying to call a procedure within a class using super object, but it won't work, what am i doing wrong here ? Code sample: program test_rpc; {$IFDEF FPC} {$MODE OBJFPC}{$H+} {$ELSE} {$APPTYPE CONSOLE} {$ENDIF} uses SysUtils,…
user1803300
2
votes
1 answer

Using the Result arg in SuperObject

i'm using this superobject unit in one of my project as an rpc protocol, and inside a remote called procedure (signature has a var Result arg) i want to know how to use that arg... isn't there a documentation ? thanks. program test_rpc; {$IFDEF…
user1803300
1
vote
1 answer

Delphi / SuperObject - Accessing subnodes away returning NIL

I have the following JSON from server: { "SuccessResponse": { "Head": { "RequestId": "", "RequestAction": "GetMultipleOrderItems", "ResponseType": "Orders", "Timestamp": "2016-05-10T15:13:06-0300" }, "Body": { …
Zero
  • 533
  • 3
  • 13
1
vote
1 answer

Delphi JSON superobject saving multiple objects to file in alphabetical order

I'm using the JSON superobject library to save objects to a file. When my code worked, they were written with proper formatting. procedure TDCell.Save(fileName: string); var i,j : integer; JsonObjCol1, JsonObjCol2, JsonObjCol3, JsonObjCol4:…
StableUpper
  • 153
  • 1
  • 1
  • 8
1
vote
2 answers

Does SuperObject have UTF-8 support

I have been using superobject for all my json parsing needs and today I ran into a bit of a problem that I cannot seem to fix. I downloaded a json file that had an entry in it that looked like this: "place" : "café"and when I tried to parse the file…
1
vote
1 answer

How to read DateTime from JSON with SuperObject?

I'm uses SuperObject library for work with JSON. I have this JSON(part of Mozilla FireFox, Chrome Bookmarks file): "roots": { "bookmark_bar": { "children": [ { "date_added": "13009663942000000", "id": "11", …
Alexandr
  • 338
  • 1
  • 4
  • 16
1
vote
1 answer

Serializing JSON object for an instance instantiated through a metaclass

The SuperObject library has a generic method for serializing objects: type TSomeObject = class ... end; var lJSON : ISuperObject; lContext : TSuperRttiContext; lSomeObject : TSomeObject; begin lSomeObject :=…
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
1
vote
0 answers

JSON - is it possible to marshall a method prototype in SuperObject?

in superobject, ISuperObject has a method called "AsMethod", what does it do ? how do i use it ? lets say i have this code, how can i marshall to json the signature itself (with params) so i can easily have it ready for the SOInvoke ? thanks…
user1803300
0
votes
2 answers

Test existence of nested JSON element (with SuperObject)

You can skip straight to the code, if you want to. The leading text is explanation, but not necessary. I am trying to use SuperObject to parse Delphi. I was just using the plain JSON classes that come with Delphi 10.4, but had difficulty with some…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
0
votes
1 answer

Delphi, TSuperObject > from JSON to Object

I have in Delphi XE4, TSuperObject: TAspTransactionBasicData = Class(TObject) Currency : Byte; Amount : Currency; constructor Create(aCurrency: Byte; aAmount:…
0
votes
1 answer

How to deal with missing JSON key when using SuperObject to get key values?

Using SuperObject in Delphi 2009. How do I deal with the situation of accessing the string value of a JSON key that might not exist? eg with this sample code JSONgood has a key 'key2' and a value for it but JSONbad doesn't have a 'key2' and so…
user2834566
  • 775
  • 9
  • 22