The library is for;
- save json data to use as mock
- read mock json data
- decode json data to expected object
JsonFellow.save(json: json, withName: "fileName")
Parameter | Type | Description |
---|---|---|
json |
String |
json |
withName |
String |
file name |
JsonFellow.dataFrom("path", .locale)
Parameter | Type | Description |
---|---|---|
path |
String |
json path |
withType |
PathType |
json path type (locale or document) |
JsonFellow.makeObject(Object.self, data)
Parameter | Type | Description |
---|---|---|
object |
T |
expected object to return from data |
data |
Data |
data which has expected object |
JsonFellow.make(Object.self, "mockDataName")
Parameter | Type | Description |
---|---|---|
object |
T |
expected object to return from data |
path |
String |
data which has expected object |
withType |
PathType |
json path type (locale or document) |