I’ve posted the project I used at XDC 2015 to show off data serialization via Introspection and JSON. You can find it here:
From the readme.md:
“This was used as an example project for author Kem Tekinay’s XDC 2105 presentation.”
Has Dana already planned your contribution for that year?
Let me explain: Shut up!
It’s fixed, thanks.
You have a very good teacher talent, the explanation is clear and exact!
I’ve been asked to mention that this class requires some setup and class registration. If sending an object over the wire, the receiving app must be set up with the same classes as the sending app, and these classes must be registered with the class, as shown in the example. Also, there will be native classes that need additional processing. For example, sending/receiving a FolderItem.
Having said that, I use a similar scheme in an an existing client/server pair and it works flawlessly, and quickly.
Thank you very much for sharing this class @Kem Tekinay ! This will be so useful in many of my projects. One of them is my Grid/Print builder project that contains many, many nested classes and hundreds of properties which to describe the layout. It should be able to ‘save’ the grid layout and reload it afterwards. Thank you again!
Arhhh! And it also contains a method to compare if objects are equal! It’s like the Xojo language just got a major update
Kem, I think I have found a bug in this class. What I’m running into is that if you have an empty string, the code throws an exception and fails.
You can duplicate this by going to your example program and adding a property called string1 as type string to MyMajorClass. Assign no default value to string1. Run the program and click Serialize. Program fails with an InvalidArgumentException. Next, add “this is a string” as the default value for string1. Run the program in the same way, program works.
From the error messages I have been getting, it looks like the code is somehow taking a empty string as a numeric value and that is causing a type mismatch.
It’s a bug in the framework. Add empty strings as Text instead.