Parsing JSON returning Null

Written by
reddit
Link to Post

https://www.reddit.com/r/golang/comments/bp0vho/parsing_json_returning_null/ by 

I have a small script which parses through a json file populated by a Curl request but am having trouble getting certain JSON fields to print anything.

Here is the script: https://pastebin.com/SThmbY7w

Here is the JSON: https://pastebin.com/neHCEj9F

So the collector and command fields are printing the proper JSON result, but the ‘Company Key’, ‘File Size’, ‘Full path’, and ‘Config Data’ is printing nothing for strings or 0 for int.

Apologies, I am a network guy slowly learning Go so I wasn’t sure where else to turn for this. Thanks

submitted by /u/networkninja7
[link] [comments]

Article Tags:
· ·
Article Categories:
reddit

Leave a Reply