Skip to content

Commit

Permalink
Fixed: return JSON data rather then string
Browse files Browse the repository at this point in the history
  • Loading branch information
ishtiaqahmad committed Jun 26, 2013
1 parent b2350e3 commit 815a285
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions grails-app/controllers/nl/nmc/ProjectController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ class ProjectController {
def folderLocation = grailsApplication.config.dataFolder
folderLocation = folderLocation.replaceAll(/"/, '')
def projectFolderLocation = "${folderLocation + File.separator }${project.name}"
def json = new File("${projectFolderLocation + File.separator }output" + File.separator + "correctedData.json").text
render json as String
def jsonStr = new File("${projectFolderLocation + File.separator }output" + File.separator + "correctedData.json").text
render JSON.parse(jsonStr) as JSON
}
}

Expand All @@ -451,8 +451,8 @@ class ProjectController {
def folderLocation = grailsApplication.config.dataFolder
folderLocation = folderLocation.replaceAll(/"/, '')
def projectFolderLocation = "${folderLocation + File.separator }${project.name}"
def json = new File("${projectFolderLocation + File.separator }output" + File.separator + "uncorrectedData.json").text
render json as String
def jsonStr = new File("${projectFolderLocation + File.separator }output" + File.separator + "uncorrectedData.json").text
render JSON.parse(jsonStr) as JSON
}
}

Expand Down

0 comments on commit 815a285

Please sign in to comment.