Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function SystemClass(jsonObject:Object)
  2.         {
  3.             // this is what we are working with
  4.         /*  {"helloworld":[{"puppetclass":{"name":"helloworld","id":1}}],"baseapps":[{"puppetclass":{"name":"baseapps","id":4}}]}
  5.             */
  6.             super();
  7.            
  8.             if (jsonObject){
  9.            
  10.                
  11.                 for each (var module:Object in jsonObject)
  12.                 {
  13.                    
  14.                     trace(module._name);
  15.                     for each (var classobj:Object in module)
  16.                     {
  17.                         // we need a better way of putting the class id in.
  18.                        
  19.                         //classes.addItem({name:classobj.puppetclass.name,id:classobj.puppetclass.id, environment:classobj.});
  20.                         classes.addItem(classobj);
  21.                     }
  22.                     //environment = jsonObject.environment as String;
  23.                     //parameters = jsonObject.parameters as Array;
  24.                 }  
  25.                
  26.             }
  27.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement