Jump to content
groovyPost Forums

Recommended Posts

Posted

HI

I have a code to start parsing Json file but don't know how to output it into an excel file? :cry: please help: here is my code:

 

import groovy.json.*

import groovy.json.JsonOutput

 

File f = new File("C:\\Users\\Pasi\\Documents\\"+File.separator+'json.txt')

def inputFile = new File("C:\\Users\\Pasi\\Documents\\json.txt")

def InputJSON = new JsonSlurper().parseText(inputFile.text)

InputJSON.each{ println it }

 

 

Thanks,

Pasi

Join the conversation

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

Guest
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...