ENGAGE-98: Kettle can't parse an application configuration JSON file that has a line break after the opening parenthesis

Metadata

Source
ENGAGE-98
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Colin Clark
Created
2009-09-26T22:18:58.000-0400
Updated
2009-11-10T14:52:05.000-0500
Versions
  1. 0.1
Fixed Versions
  1. 0.1
Component
  1. Kettle

Description

KettleServlet seems to have a bug in its JSON parsing code where a nicely formatted JSON object like this will fail to parse:

{
"initFunction": "colin.marineWeather.init",
"handlerFunction": "fluid.kettle.servlet.process",
"includes": "kettle/KettleIncludes.json",
"loaderFunction": "colin.marineWeather.init",
"debugMode": true
}

Whereas, if we trim the leading line break like this, everything works:

{"initFunction": "colin.marineWeather.init",
"handlerFunction": "fluid.kettle.servlet.process",
"includes": "kettle/KettleIncludes.json",
"loaderFunction": "colin.marineWeather.init",
"debugMode": true
}

Comments

  • Justin Obara commented 2009-11-10T14:52:05.000-0500

    This appears to have been fixed, the json file shipping with engage 0.1 looked like this.

    {
    initFunction: "fluid.engage.initEngageApp",
    handlerFunction: "fluid.kettle.servlet.process",
    includes: "kettle/KettleIncludes.json",
    includesPrefix: "kettle/",
    loaderFunction: "fluid.engage.initEngageApp",
    queryURLTemplate: "http://titan.atrc.utoronto.ca:5984/�Name/_fti/lucene/%view?include_docs=true&q=%query",
    initServices: [
    "fluid.artifactView.initMarkupFeed",
    "fluid.artifactView.initDataFeed",
    "fluid.browseDemo.initBrowseDemo",
    "fluid.browseDemo.initBrowseDataFeed",
    "fluid.engageDemo.initEngageDemo",
    "fluid.kettleDemo.initCherryDemo",
    "fluid.kettleDemo.initJSGIHandlerDemo"
    ],
    views: {
    all: "all",
    byCollectionCategory: "by_collection_category"
    },
    mount: {
    infusion: {
    target: "infusion/",
    source: "../../../../fluid-infusion/src/webapp/"
    },
    engage: {
    target: "engage-core/",
    source: "../../../../fluid-engage-core/"
    },
    engageDemo: {
    target: "engageDemo/",
    source: "services/engageDemo/",
    rewriteSource: "../../engageDemo/"
    },
    kettleDemo: {
    target: "kettleDemo/",
    source: "services/kettleDemo/",
    rewriteSource: "../../services/kettleDemo/"
    }
    }
    debugMode: true
    }