1
0
-1

What is causing this error to occur, and how can it be fixed?

ERROR 06 May 2024 11:35:41 org.joget.apps.form.lib.Grid - Error parsing grid JSON
2295
org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]

  1. Aristo

    Hi,

    Can you elaborate how to reproduce the error or also better to provide screen capture of the error? 

  2. Fong

    Here is the error, i cannot elaborate it, because it will always show in the log everyday. Its my form problem or?

  3. Aristo

    Do you have access to the DB table, if yes, Try to have a look what's the value for the Grid element. It could be any of:

    1. The value in the table is empty → empty string is not recognized as array
    2. The value exists but not recognized as json array
    3. Error when executing Load Binder for the Grid element
  4. Fong

    my database of the grid value can be like this [{"Items":""}] and null. So the error come out when the column is null? and not like [{"Items":""}] ?

    Conclusion the column must have [{"Items":""}] instead of null?


  5. Aristo

    You need to make sure the content is not "null" as a string but really a NULL inside the database.

CommentAdd your comment...

1 answer

  1.  
    1
    0
    -1

    The error message you encountered indicates that there was a problem parsing JSON data related to a grid. Specifically, the system expected the JSON data to start with '[' to signify an array, but it seems to start with a different character at position 2 on line 1.

    You'll need to ensure that the JSON data representing the grid starts with '[' as expected. This might involve checking the formatting of the data being passed to the system.

      CommentAdd your comment...