Problem with null value not appearing in JSON

Problem with null value not appearing in JSON

klunkklunk Posts: 4Questions: 0Answers: 0
edited June 2013 in General
I am using AJAX from a REST service served by Jersey.

The problem I have is that the value is null in Java so it is not getting serialized into the JSON. This is giving an error message when the data loads but the datatable is shown correctly. I am using JAXB generated java classes.

I know the AJAX and table are working fine because when I dont have null values everything works fine.

Replies

  • klunkklunk Posts: 4Questions: 0Answers: 0
    Sorry, I should have said, how can I stop the warning message?

    The table is generated with this code

    [code] $('#executiondata').dataTable({
    "bProcessing": true,
    "bDestroy": true,
    "sAjaxSource": "/freewheel/api/executions/json"
    "aoColumns": [
    {"mData": "@corrolationId"}
    {"mData": "@uid"}
    {"mData": "@jobname"}
    {"mData": "@jobtype"}
    {"mData": "@startTime"}
    {"mData": "@endTime"}
    {"mData": "status"}
    ]
    "aaSorting": [
    [4, "desc"]
    [5, "desc"]
    ],
    "aoColumnDefs": [{ "bSearchable": false, "bVisible": false, "sDefaultContent": "", "aTargets": [0, 1]}],
    "bJQueryUI": true
    })
    [/code]
  • klunkklunk Posts: 4Questions: 0Answers: 0
    I have spotted the problem, the default values I specified was on the column def for another column.
This discussion has been closed.