Jump to content

[CR] JSON LabVIEW


Recommended Posts

14 hours ago, drjdpowell said:

I’m recording my work on Messenger Library and all other reuse libraries, and hope to claim at least some of them also.   JSON just happens to be what I am working on right now.  

Yes. But what is the requirement that means it has to be under your company name? Is it that you fear if it is not then your argument to the tax office is diminished or is there a specific clause that states open source does not constitute a "product" that you own and therefore cannot be accepted? i.e. is this a speculative move or is there a definite clause that applies?

Link to comment

Speculative, to establish that the work is legitimate R&D of my company.  I want to be able to show a tax inspector a company-branded product on the LabVIEW Tools Network.

BTW, I’ve found I can separate the new stuff into a separate, non-conflicting project, so LAVA JSON can be left as is (I’ll bring out a new version with some modest performance improvements).

Link to comment
5 minutes ago, drjdpowell said:

Speculative, to establish that the work is legitimate R&D of my company.  I want to be able to show a tax inspector a company-branded product on the LabVIEW Tools Network.

BTW, I’ve found I can separate the new stuff into a separate, non-conflicting project, so LAVA JSON can be left as is (I’ll bring out a new version with some modest performance improvements).

Just be careful they don't label you a contractor then there are zero benefits to being a company apart from liability.

Link to comment
  • 1 month later...

Hi all,

I am trying to start working with this library, but it doesn't look straight forward to me. There are only 2 polymorphic VIs that I can access to, but I see that you guys are using a wide variety of VIs that I cannot even get to find. Is there any "user guide" thread in the forum that I am missing? Can you guys address me or give me some hints on how to start with the library?

Thank you so much. 

Link to comment
12 hours ago, JPina said:

Hi all,

I am trying to start working with this library, but it doesn't look straight forward to me. There are only 2 polymorphic VIs that I can access to, but I see that you guys are using a wide variety of VIs that I cannot even get to find. Is there any "user guide" thread in the forum that I am missing? Can you guys address me or give me some hints on how to start with the library?

Thank you so much. 

Place the polymorphic VI on the diagram and click the label at the bottom. A menu with all the functions will appear which will enable you to choose from all the functions. Copy and paste the VI (or drag with the mouse+CTRL to create a copy) and choose another function as before to create another function.

  • Like 1
Link to comment
  • 9 months later...
  • 5 months later...

Hi,

is there any reason why the VIs ar not reentrant? (shared clone) If there is no reason, could someone modify the VIs to reentrant and update the package.

The reason i would like reentrancy is that when using this library in parallel loops, they wait for each other.

BR Ziga 

Link to comment

I was going to say I don’t do blanket shared-reentrant, as that create at least one copy per processor, and for lesser-used functions this is memory overhead that is often not justified.  However, I’m not sure that is true of LabVIEW 2017 (seems to be only one clone).  

Edited by drjdpowell
Link to comment
  • 5 months later...

I'm using JSON to store control and indicator values of which I don't know the datatype.

I use dynamic VI calling, I set controls using VI Reference -> Set Control values, run the VI, and get the indicators using 'Get Control values'; those need an give back variants. These values I want to load from JSON and store back to JSON

Link to comment
  • 10 months later...

I'm using this library, but I've had to modify alot of the variant related attributes for performance and data handling.  Most of what I have removes the OpenG stuff and directly casts types.  It will also properly preserve data names/typing unlike the current version without extra variant to data casts.

I don't really want to go through all the data types that I'm not using, but If you're still interested in maintaining this its probably a worthwhile upgrade.

Get as Variant

image.png.254f1005fbc7d6444708d8aad8bf8d5c.png

image.png.1b5f272306b67eba59faa6fa5d89b7b4.png

logic will change to look more like this

image.png.6acfa92607afb9b74ba1caf6d0a8677f.png

 

surely there will be some difficulties with this approach on certain data types, and I dont really want to go through and test them, but dynamically building variants is pretty slow and some of the functions are quarter baked which removes the type string.

I've got an assortment of scalars, arrays, and clusters working with this method.

Let me know if you're interested in this.

Link to comment

I ask about performance because I wouldn't have thought your new method would in general be faster.  

When I was considering how to improve the performance of this library I became convinced that I should produce a new package that delt directly with strings, abandoning the objects and variant attributes used here.  That package is JSONtext, which I use in all new work.  So I am unlikely to make more than minor improvements to this library.  However, someone else could continue development of LAVA JSON if they like.

 

Link to comment
  • 11 months later...

Hi,

I am using jsontext library and am wondering if circular reference is supported.  For example: I would like to get the value (10) when I ask for NeedValueFromAbove,

Here is a simple json file to illustrate my point

{

"Hello":

{

"World":10

},

"NeedValueFromAbove":{"$ref":"#/Hello/World"}

}

Link to comment
  • 1 year later...

Hi!
First, I want to thank you for the work you have done.
It is strange that no one has written before.
Functions:

...\JSON API\JSON Scalar\Get as I64.vi

...\JSON API\JSON Scalar\Get as U64.vi


Do not have input defining the node name: Name Array
I added it and everything works, by installing the library from VIPM my code will not be able to run.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.