title: Add JSONObject to a JSON Array
body: <p>I am new to Python. Here is my code</p>
  
  <pre><code>class Test(Base):
       __tablename__ = 'test'
       __public__ = ('my_id', 'name')
       my_id = Column(Integer, primary_key=True)
       name = Column(String)
       def __init__(self, id, name):
           self.my_id = id
           self.name = name
       def __repr__(self):
           return "&lt;User('%d','%s')&gt;" % (self.id, self.name)
       @property   
       def json(self):    
           return to_json(self, self.__class__)
  
  output=[]
  users= cess.query(Test).order_by(Test.my_id).distinct().all()
  for c in users:
      output.append(c.json)
  
  print json.dumps(output)
  </code></pre>
  
  <p>But this is not correct json? I want to add all the json objects from the for loop into a proper json array, so the client can loop over it ? How can i do this ? </p>