patrickp / wobj Goto Github PK
View Code? Open in Web Editor NEWGeneric Object Library for Multi-Value Systems
Generic Object Library for Multi-Value Systems
Eliminate need for separate code for different platforms
MX0C should be handled with a equate
Options can be done via a include (that could set the equate)
S0RT -??
Currently this library is encoding any characters outside the printable range. This is incorrect. It needs to only encode what is required by the RFC spec. Need to review what to do on platforms that cannot handle UTF-8? Did a quick test on jBase and removing the high encoding did make utf-8 work correctly.
Add error handling for.
No object passed.
Invalid Action
Any null entries passed as options.
When the feature to be able to add a actual json object/array when doing a set.object or set.array was added the old behavior broke.
CALL WOBJ(OBJ,"SET.OBJECT","newobject","","",RERR) ; * This used to add a blank object, it now errors.
CALL WOBJ(OBJ,"SET.OBJECT","newobject","{}","",RERR); * this is what is needed now.
same with set.array
CALL WOBJ(OBJ,"SET.ARRAY","Array","","",RERR); * while this looks to work you cannot add a object to it
CALL WOBJ(OBJ,"SET.ARRAY,"Array","[]","",RERR); * this seems to work.
Propose that for either function if no value is sent to default to {} for object and [] for aray.
It would be nice to be able to pull normal arrays (not array of objects) into a pick multivalue. Same for setting.
Example
ARRAY=1
ARRAY<-1>=2
ARRAY<-1>=3
CALL WOBJ(OBJ,"SET.ARRAY","testarray",ARRAY,"",RERR)
Recommend looking to see if ARRAY starts with a { or a [. If it does not then look for @am and use that to build
[ "1", "2", "3" ] and add that.
Same on extract. Perhaps a new action such as GET.ARRAY.MV and return it as a multivalue.
Verify parsing is working right when last item is a NULL. It will convert to json just fine, but a get generates an error. You will also see an error on the parse complaining about missing last }. It looks to be an issue possibly with determine the end of those items and a } with no space. Example
{ "value": null}
May have something to do with no quote and knowing we are pass the NULL entry.
The latest version is no longer allowing you to parse json when the root element is a array. This looks to be a error check on the fromstring function checking that the first character is a {. this needs to also allow a [. Also verify the root being an array continues to work.
Allow set object and set array to take an actual object vs requiring it to be converted first json. This is an issue in that you cannot just WOBJ again due to the named common. Better solution may be to just interrogate the object/arrays and punch them in.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.