Data should be tested to be objects and not necessarily plain objects
Data should be tested to be objects and not necessarily plain objects

Given loadash's definition, a plain object is a object with a prototype of null.
json-api-serializer tests input type either to detect if it can address attributes using index or if it needs to go further in the recursion.
Input objects does not need to be plain objects as the prototype would no matter.

danivek/json-api-serializer