The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

mike.gage (1) [Avatar] Offline
#1
When I ran the code from Listing 14.17, I received the error:

Caught: groovy.lang.MissingMethodException: No signature of method: groovy.json.JsonSlurper.parse() is applicable for argument types: (java.io.File) values: [data/plan.json]
Possible solutions: parse(java.io.Reader), use([Ljava.lang.Objectsmilie, wait(), grep(), any(), wait(long)

The issue was corrected by modifying the applicable line of code to:

def plan = new JsonSlurper().parse(new File('data/plan.json').newReader())
paulk_asert (33) [Avatar] Offline
#2
Re: Listing 14.17 Issue
Alternatively, you can use the 2.2.0-beta-1 version of Groovy which has the required method. Thanks.