Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic; XML to JSON; XML sequence with 1 element to JSON Array.

a bbb
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using the Java implementation of with sources here:

I have a problem converting a sequence of elements.
Sometimes my sequence has 1 element and other times it has several.

Is transformed to


Is transformed to

My method is

How can I instruct the XML.toJSONObject(xmlText)
that XML element <contractLine> Must be an Array?

I searched the web,
read the documentation
but I did not find a suitable approach for this library.

Thank you,
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic