QB64 Phoenix Edition
JSON in QB64 - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2)
+--- Thread: JSON in QB64 (/showthread.php?tid=1449)



JSON in QB64 - SpriggsySpriggs - 02-06-2023

You all can mostly ignore this. I'm posting this so I don't lose it. However, I'll make a full post once I make it better.

Code: (Select All)
Option Explicit
$NoPrefix
$Console:Only

Print GetEdiSchemaKey("$edi.transactionSets.heading.beginning_segment_for_ship_notice_BSN")

Function GetEdiSchemaKey$ (keyPath As String)
    GetEdiSchemaKey = pipecom_lite("PowerShell -NoProfile $edi = (Get-Content -Path " + Chr$(34) + "C:\Users\zspriggs\Downloads\edi856.json" + Chr$(34) + " ^| ConvertFrom-Json);" + keyPath + " ^| ConvertTo-Json")
End Function

'$Include:'pipecomqb64.bas'



RE: JSON in QB64 - madscijr - 02-07-2023

(02-06-2023, 09:26 PM)Balderdash Wrote: You all can mostly ignore this. I'm posting this so I don't lose it. However, I'll make a full post once I make it better.

Are you working on JSONify and stringify for QB64?
That would be most awesome.


RE: JSON in QB64 - SpriggsySpriggs - 02-08-2023

@madscijr I'm not sure about JSONify and stringify but what I'm working on right now is really just parsing JSON with PowerShell. It seems to be going alright, albeit some quirks are present. I might try that JSON C library I found a long time ago but I think it might have been a pain in the butt.


RE: JSON in QB64 - madscijr - 02-08-2023

(02-08-2023, 05:25 PM)Balderdash Wrote: @madscijr I'm not sure about JSONify and stringify but what I'm working on right now is really just parsing JSON with PowerShell. It seems to be going alright, albeit some quirks are present. I might try that JSON C library I found a long time ago but I think it might have been a pain in the butt.

Good luck! 

(PS JSONify and stringify for QB64PE would be useful for a lot of things.)