<p>I've been developing a "Form Builder" in Javascript, and coming up to the part where I'll be sending the spec for the form back to the server to be stored. The builder maintains an internal data structure that represents the fields, label, options (for select/checkbox/radio), mandatory status, and the general sorting order of the fields.</p>

<p>When I want to send this structure back to the server, which format should I communicate it with?</p>

<p>Also, when restoring a server-saved form back into my Javascript builder, should I load in the data in the same format it sent it with, or should I rebuild the fields using the builder's <code>createField()</code> functions?</p>

I'd implement some sort of custom
```
text serialization
```
and transmit plain text. As you say, you can rebuild the information doing the reversed process.