How to convert Badgerfish style JSON to a .NET object or XML in C#? -


.net prefers newtonsoft json serializer/deserializer when using rest api.

the d&b direct rest implementation uses badgerfish approach (which exist in java world (jettison namespace) json minor variations: d&b badgerfish.

i map d&b badgerfish json responses .net classes. there github project https://github.com/bramstein/xsltjson/ enables conversion xml json (supporting badgerfish), how do opposite mentioned below:

xsltjson supports several different json output formats, compact output format support badgerfish convention, allows round-trips between xml , json.

for example, imagine d&b backend rest service converting xml:

<salesrevenueamount currencyisoalpha3code="usd”>1000000</salesrevenueamount> <salesrevenueamount currencyisoalpha3code="cad”>1040000</salesrevenueamount> 

.. into:

"salesrevenueamount": [     {    "@currencyisoalpha3code": "usd",    "$": 1000000 }, {    "@currencyisoalpha3code": "cad",    "$": 1040000 } ] 

so how can use return badgerfish formatted json response (slightly modified original specification) in .net rest client?


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -