Hey all, when I put this in mappings: ```{ "requ...
# help
d
Hey all, when I put this in mappings:
Copy code
{
  "request": {
    "method": "GET",
    "url": "/locations"
  },
  "response": {
    "status": 200,
    "body": {
      "content": "yes"
    }
  }
}
Starting WireMock fails after:
Copy code
Exception in thread "main" com.github.tomakehurst.wiremock.standalone.MappingFileException: Error loading file /home/wiremock/./mappings/locatons.json:
Cannot deserialize value of type `java.lang.String` from Object value (token `JsonToken.START_OBJECT`)
	at com.github.tomakehurst.wiremock.standalone.JsonFileMappingsSource.loadMappingsInto(JsonFileMappingsSource.java:126)
	at com.github.tomakehurst.wiremock.core.WireMockApp.loadMappingsUsing(WireMockApp.java:288)
	at com.github.tomakehurst.wiremock.core.WireMockApp.loadDefaultMappings(WireMockApp.java:282)
	at com.github.tomakehurst.wiremock.core.WireMockApp.<init>(WireMockApp.java:143)
	at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:68)
	at com.github.tomakehurst.wiremock.standalone.WireMockServerRunner.run(WireMockServerRunner.java:71)
	at wiremock.Run.main(Run.java:23)
exit status 1
When
body
is just a string, Wiremock is starting. Is there a way to find out what exactly is the problem?
l
body
is just for strings. If you want to specify the body as json as you are doing in your example, you need to use
jsonBody
d
Thanks!