Well, no other replies, and I have worked on this until it works satisfactorily for me. It turns out the fix is even simpler, but also more complicated. In the code above, remove the code from within the else clause. The ScriptObjectBuilder ends up passing the value of "value" into JavaScriptSerializer...