1 Reply Latest reply on Oct 16, 2009 4:28 AM by zubair

    json format query

    zubair

      Hi I have a text file containing the following text

       

      {
          "bg_colour": "#FFFFFF",

       

          "x_legend":{
              "text":        "X Scale Legend",
              "style":    "{font-size: 10px; color: #000000}"
          },
          "y_legend":{
              "text":        "Y Scale Legend",
              "style":    "{font-size: 11px; color: #000000}"
          },

       

          "elements":[
              {
                  "type":        "bar",
                  "alpha":    1,
                  "colour":    "#736AFF",
                  "font-size":    8,
                  "on-show":    {"type":""},
                  "values":    [9,6,7,9,5,7,6,9,2],
                  "text":        "",
                  "tip":        "Y Scale Legend:<br>#val#"
              }
          ],

       

          "x_axis":{
              "colour":    "#525151",
              "grid-colour":    "#CCCACA",
              "stroke":    1,
              "tick_height":    10,
              "labels":    ["January","February","March","April","May","June","July","August","Spetember"]
          },

       

          "y_axis":{
              "stroke":    1,
              "colour":    "#525151",
              "grid-colour":    "#CCCACA",
              "tick_length":    3,
              "offset":    0,
              "max":        10
          }

       

      }

       

       

      No i am using json.cfc which has the function to take in a coldfusion structure and then return the data in a json format.

      http://www.epiphantastic.com/cfjson/examples.php

       

      What i want is to create a similar structure for the data contained in the text file above which i can then pass to the method in json.cfc which will then return the data in json format.

       

      Can anyone help in how i should create the coldfusion structure?

       

      Thanks