|
On Tue, Jul 25, 2017 at 8:47 AM, jacobus erps <jacobus.erps@xxxxxxxxx>
wrote:
The textual representation will look a lot like JSON.
You say "a lot like JSON". In what ways will it not be *exactly* JSON?
The reason I ask is that there is a lot of value to being able to
generate standard JSON, and import directly from standard JSON.
Granted, there may be some information loss in terms of specific data
types. But I strongly recommend that a subset of valid RpgMap
instances be EXACTLY serializable as JSON, such that they can make a
round trip to JSON and back to RpgMap with 100% fidelity.
Then a broader subset of RpgMap instances should still be serializable
into standard JSON but with type loss (for example, your RpgMap may
contain declared 20-digit integers, but as long as their values fit in
10 digits, it should be acceptable that in the round trip, they come
back as 10-digit integers).
Hopefully, you can import *any* valid JSON into an RpgMap. Obviously
you'll have to have rules for type conversions, but this would be a
killer feature. It would go a long way toward popularizing your
library as well as making RPG a friendlier language for JSON
processing.
I understand you'll want to be able to serialize any RpgMap perfectly.
This could either be with custom extensions to JSON (which would only
be readable by your library, but would handle the RpgMap instances
that don't serialize into standard JSON), or a completely separate
format. (You could perhaps draw inspiration from Python's pickle
format, for example, as well as the way Python handles JSON.)
Forgive me if you've already thought of all those things. If so, then
just consider it advance positive feedback. :)
John Y.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.