Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def from_json(cls, json_token):
return Token(
text=str(json_token["text"]),
font=str(json_token["font"]),
left=float(json_token["left"]),
right=float(json_token["right"]),
top=float(json_token["top"]),
bottom=float(json_token["bottom"]),
font_size=float(json_token["fontSize"]),
space_width=float(json_token["fontSpaceWidth"])
)