Update #serializeProperty and #serializeNestedResource

Another try, now providing a nested variable to determin if a resource is nested and should be returned without being wrapped in a named object even though it might have resourceName-property.