JDP Science Tools

cancel
Showing results for 
Search instead for 
Did you mean: 

BETA version of JSONtext 1.6

Beta version 1.6.0

  • New Pretty Print and Minify functions (faster than using Reformat, and Pretty Print preserves Comments)
  • Methods to support JSON Config files, with Comments, and the ability to have multiple writers (multiple apps, or a User making changes with an editor).  See the Example Applications 1 and 2.

2021-04-28 11_42_08-JSONtext Config Example Application 1.vi Block Diagram.png

 

Message 1 of 8
(329 Views)

I like the Pretty Print!

_________________________
All your base are belong to us.
0 Kudos
Message 2 of 8
(278 Views)

Just to show one design goal, which is to recover from common User errors with editing JSON files, here I use Notepad++ to cut and paste the "A" parameter from the top to the bottom of the list.  My common error is to not adjust the commas (one is missing, and an extra one is "trailing" the list):

2021-04-28 15_24_30-__Mac_Home_Documents_LabVIEW Data_JSONtext Config Example.json - Notepad++.png

 

"Pretty Print" will correct such comma errors, so on reading the config we get:

2021-04-28 15_25_23-JSONtext Config Example Application 1.vi.png

Message 3 of 8
(276 Views)

Beta 1.6.2: 

--> Adds support for Sets and Maps in 2019+ 

      See https://bitbucket.org/drjdpowell/jsontext/issues/74/add-support-for-maps-set

 

Note: with no Sets/Maps in 2017, I am using slower old-school flattening techniques to support them.  I can also not add them to my Unit Test suite (as it is in 2017), so this could do with User testing to find edge cases.

 

 

Message 4 of 8
(159 Views)

I am stuck in LV2018 for hardware that went out of support after that. Really appreciate you making this non-breaking in 2018!

 

Does it support variant-attribute maps in 2018? I made my own dictionary and set utilities based on them, and would really love to serialize them with your library. I am switching to JSONtext for all forward development.

0 Kudos
Message 5 of 8
(155 Views)

@daenglis wrote:

Does it support variant-attribute maps in 2018? I made my own dictionary and set utilities based on them, and would really love to serialize them with your library. 


Going from a Variant-attribute map to JSON is implemented, but the reverse journey is not.  The reverse is problematic, as JSON doesn't carry the precise LabVIEW type to convert to, so if I wrote it, it couldn't properly convert any types but strings, numbers and booleans.  Which is probably useless for you.  

 

I don't actually use Variant-Attribute Maps like this, but I might be able to help.  Possibly I could save type information.  Or you could provide a type (if all your Map attributes have teh same type).

0 Kudos
Message 6 of 8
(130 Views)
0 Kudos
Message 7 of 8
(94 Views)

1.6.4: just updates the documentation on teh new features.

 

0 Kudos
Message 8 of 8
(52 Views)