Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

buildXmlInput and deepToArray don't allow single-wrapper arrays #25

Open
benbuckman opened this issue Dec 17, 2015 · 0 comments
Open

buildXmlInput and deepToArray don't allow single-wrapper arrays #25

benbuckman opened this issue Dec 17, 2015 · 0 comments
Assignees
Labels

Comments

@benbuckman
Copy link
Owner

The module is trying to be smart in converting the input JSON params to XML.
See deep-to-array.test.js and xml-request.test.js.

So given an input param thing: ['a', 'b', 'c'], it converts that to

<thing>a</thing>
<thing>b</thing>
<thing>c</thing>

But if we want to do something like,

<OrderIDArray>
  <OrderID>aaaa</OrderID>
  <OrderID>bbbb</OrderID>
</OrderIDArray>

This doesn't seem currently possible.

Should the module try to stay smart, and somehow differentiate these? Or should the input param structure simply follow the xml module's pattern without conversion?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant