SCIM modeling standard

Introduction

Identify REST API is shipped with a DLL that contains all model definitions which can be very useful when you need to consume the REST API using .NET code. However, a small problem with it for previous versions of Identify is that we weren’t very consistent when it comes to decorating the models for JSON serialization. While some models were decorated with JsonObject and JsonMember, some others used DataContract and DataMember which confused developers when they had to choose a json serialization library to work with the models. After careful consideration, we decided to use DataContract and DataMember to decorate all models consistently.

Design rationale

There are many reasons we prefer DataContract over JsonObject

  • It is a built-in .NET feature and it can support serialization to many other data format such as XML, just in case.
  • With DataContract, public fields and properties are omitted by default. Only fields and properties that are decorated are serialized which can reduce redundancy and improve performance in overall.
  • This improvement causes no change in JSON output result.
Was this helpful ?Good Somewhat Bad