Extended Choice Parameter read from JSON file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Extended Choice Parameter read from JSON file

Gadi Dor
Dear Sir,

I want to start using Extended Choice Parameter ,

I can load json parameter from here:

def object = '''{
        disable_edit_json: true,
        disable_properties: true,
        no_additional_properties: true,
        disable_collapse: true,
        disable_array_add: true,
        disable_array_delete: true,
        disable_array_reorder: true,
        theme: "bootstrap2",
        iconlib:"fontawesome4",
        schema: {
          "type": "object",
          "title": "Name",
          "properties": {
            "first_name": {
              "type": "string",
              "propertyOrder" : 1
            },
            "last_name": {
              "type": "string",
              "propertyOrder" : 2
            },
            "full_name": {
              "type": "string",
              "propertyOrder" : 3,
              "template": "{{fname}} {{lname}}",
              "watch": {
                "fname": "first_name",
                "lname": "last_name"
              }
            }
          }
        },
        startval: {
            "first_name" : "John",
            "last_name" : "Doe",
            "full_name" : "John Doe"
        }
}'''

but I want to load object has a file,

something like:

def  fileContents = new File('test.json').text

def jsonEditorOptions = Boon.fromJson(fileContents)

return jsonEditorOptions;

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/2aec4093-23dd-47b7-a4d4-5787d5a8f272%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extended Choice Parameter read from JSON file

Paz Schori

hi we also try to use Extended Choice Parameter by load json from file, did you manage to solve this , will appreciated if you can share how you solve it
?
בתאריך יום רביעי, 25 בינואר 2017 בשעה 14:06:40 UTC+2, מאת Gadi Dor:
Dear Sir,

I want to start using Extended Choice Parameter ,

I can load json parameter from here:

def object = '''{
        disable_edit_json: true,
        disable_properties: true,
        no_additional_properties: true,
        disable_collapse: true,
        disable_array_add: true,
        disable_array_delete: true,
        disable_array_reorder: true,
        theme: "bootstrap2",
        iconlib:"fontawesome4",
        schema: {
          "type": "object",
          "title": "Name",
          "properties": {
            "first_name": {
              "type": "string",
              "propertyOrder" : 1
            },
            "last_name": {
              "type": "string",
              "propertyOrder" : 2
            },
            "full_name": {
              "type": "string",
              "propertyOrder" : 3,
              "template": "{{fname}} {{lname}}",
              "watch": {
                "fname": "first_name",
                "lname": "last_name"
              }
            }
          }
        },
        startval: {
            "first_name" : "John",
            "last_name" : "Doe",
            "full_name" : "John Doe"
        }
}'''

but I want to load object has a file,

something like:

def  fileContents = new File('test.json').text

def jsonEditorOptions = Boon.fromJson(fileContents)

return jsonEditorOptions;

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5f64aad7-5d94-4818-8302-939972a24520%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.