How should I write that one property in a `Map` is...
# pact-go
r
How should I write that one property in a
Map
is another composite object (not array)?
Copy code
WithJSONBody(Map{
   "id":        Integer(1296269),
   "node_id":   S("MDEwOlJlcG9zaXRvcnkxMjk2MjY5"),
   "name":      S("foo"),
   "full_name": S("theorg/foo"),
   "owner": Map{
	   "login": S("theorg"),
   },
})
The above gives me an error on the line where I specify another
Map
for
owner
.
m
If you want to put an object in there, you’ll need to use a more general data structure - e.g. an
map[string]interface{}
as the root object where the values are matchers or nested map structures