Relative Content

Tag Archive for c#jsonasp.net-core

Creating multiple JSON request bodies for third party APIs

I’m working on a project that will be integrating with multiple third-party providers’ APIs and I’ll need to create the JSON request body for each API using an internal data model. Generally, each provider has multiple APIs containing one or more of the same child objects from their schema. For example, the project will be integrated with various shipping providers such as FedEx, UPS, USPS, etc. and each one the providers has a list of APIs usually containing a child object for shipping address. For this reason, I need to be able to write functions that will create portions of the JSON request.