Json-server: "Data must be an object"

Created on 20 Feb 2019  路  2Comments  路  Source: typicode/json-server

I keep getting this error: "Error: Data must be an object. Found object.See https://github.com/typicode/json-server for example."

I thought it may have been my formatting so I used your sample db.json to see but still I get this error. if there's a fix and you could help that would be greatly appreciated.

Most helpful comment

Only json object can be "parsed" e.g.
{
"jsonarray":[{
}]
}

All 2 comments

Only json object can be "parsed" e.g.
{
"jsonarray":[{
}]
}

@beatakru Tks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AdamCook44 picture AdamCook44  路  3Comments

goldmont picture goldmont  路  3Comments

TXRRNT picture TXRRNT  路  4Comments

ashleydavis picture ashleydavis  路  3Comments

bahmutov picture bahmutov  路  3Comments