Why would you want to do that?

Here's sample production class:

Class Test.Production Extends Ens.Production
{

XData ProductionDefinition
{
<Production Name="Test.Production" TestingEnabled="true" LogGeneralTraceEvents="true">
  <Description></Description>
  <ActorPoolSize>1</ActorPoolSize>
ion>
}

}

Ens.Config.Production serialized is XData ProductionDefinition and not the class itself.

To create production class automatically you need to:

  1. Create %Dictionary.ClassDefinition object for your test production
  2. Create Ens.Config.Production object
  3. Create %Dictionary.XDataDefinition
  4. Serialize (2) into (3)
  5. Insert XData (3) into (1)
  6. Save and compile (1)

Convert json to proxy object (list of in your case) and iterate over it

set json = "[{""Name"":""bat""},{""Name"":""Cat""},{""Name"":""rat""},{""Name"":""mat""},{""Name"":""hat""},{""Name"":""chat""},{""Name"":""please""},{""Name"":""help""},{""Name"":""me""},{""Name"":""in""},{""Name"":""getting""},{""Name"":""the""},{""Name"":""value""},{""Name"":""of""},{""Name"":""nameFromObjectInsideArray""}]"
set sc = ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(json,,.obj,1)
for i=1:1:obj.Count() { 
    write obj.GetAt(i).Name,!
}

To get json string from  request:

set json = %request.Content.Read($$$MaxStringLength)

You may also need to convert request into UTF8:

set json = $ZCVT(json,"I","UTF8")

Sorry I'm lost here. and not sure what you in 1,2 or 3 !?

It's an iterative process to pinpoint and remove errors. You start by establishing a channel which can send valid requests. For example using Postman. Next you compare valid request (which you can now consistently send) with your request which does not pass. Next you iteratively break valid request or fix failed request or send failed request via Postman. Sooner or later you understand what causes your request to fail and fix that.

the other difference is that Now they also require a Header, before they they only had a Body in their API.  

You need to add all required headers via SetHeader method.

I think my date is already like that!? do you mean removing the double quotes or changing it to YYYY-DD-MM?

You're sending:

"PaymentRecordTransactionD":"PaymentRecordTransactionD"

But API expects:

PaymentRecordTransactionD": "2014-12-31"

Looks different for me.

The error says parse error, but in this case I think it means either datatype validation (probably)  or fixed property order (less probable, but that can actually happen). My default advice in cases like this is as follows:

  1. Set up a way to send valid requests
  2. Send request via Caché/Ensemble
  3. Compare (DiffDog, etc) requests from 1 and 2, here you need to:
    • Modify valid request till it fails
    • Modify invalid request  till it succeeds

In your case the first modification I would do is replacing dates with real dates, for example with 2014-01-11.