[CLOSED] JSON deserialisation issue with multicombo boxes.

  1. #1

    [CLOSED] JSON deserialisation issue with multicombo boxes.

    I have a form panel that is submitting through to a controller method that receives the form fields and needs to deserialise it. This works fine for text fields, but for combo boxes I get an error such as:

    "Error reading string. Unexpected token: StartArray. Path 'mcbBillingStatus', line 1, position 59."
    The input string is typically something like this (by default):
    "{\"txtServiceId\":\"\",\"txtServiceName\":\"\",\"mcbBillingStatus\":[],\"txtCustomerReference\":\"\",\"txtServiceAlias\":\"\",\"mcbOperationalStatus\":[],\"txtServiceReference\":\"\",\"txtSalesOrderNumber\":\"\",\"ddtServiceType\":null,\"txtMinMonthlyAmount\":\"\",\"id64bab6e3f30086b5\":\"(MIN) - $ \",\"txtMaxMonthlyAmount\":\"\",\"idce170880d87c86b5\":\"(MAX)\",\"cmbCustomer\":null}"
    as you can see, if there is no selected value in the multi combo, it just comes back as [] and fails on the JSON.deserialize call. I've tried setting the empty value attribute with no luck - it seems to be ignored altogether (perhaps this is because I have the EmptyText attribute used also?)

    thanks
    Last edited by Daniil; Jun 08, 2012 at 2:20 PM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hi,

    Well, I guess the question is related to this one?
    http://forums.ext.net/showthread.php...ll=1#post83049

    Well, in the case with MultiCombo I think you should use:
    Dictionary<string, object>
    Because an array cannot be deserialized to string.

Similar Threads

  1. ValuesToJsonArray from MultiCombo issue
    By zfreeman in forum 2.x Help
    Replies: 4
    Last Post: Jan 22, 2013, 1:35 PM
  2. [CLOSED] Remote Tree Grid Json issue
    By craig2005 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 27, 2012, 3:09 PM
  3. [CLOSED] Issue with text boxes/spinner fields in IE6
    By musher in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 05, 2012, 10:37 AM
  4. [CLOSED] MultiCombo Example Issue
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 22, 2012, 2:38 PM
  5. [CLOSED] Radio button group issue with MultiCombo.
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 22, 2011, 2:23 PM

Posting Permissions