Skip to content

Instantly share code, notes, and snippets.

@ninijay
Created September 20, 2016 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ninijay/6fac88dcdc37acccae4970e6aa101757 to your computer and use it in GitHub Desktop.
Save ninijay/6fac88dcdc37acccae4970e6aa101757 to your computer and use it in GitHub Desktop.
null created by ninijay - https://repl.it/Ddvv/0
import json
class Button(object):
callback_data = ""
text = ""
def __init__(self, callback_data, text):
self.callback_data = callback_data
self.text = text
btn = Button("blah", "blah")
s = json.dumps(btn.__dict__)
print(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment