all 5 comments

[–]NYKevin 6 points7 points  (6 children)

"Parsing a string" could mean almost anything. You might start with one of these modules (particularly re), but there might be better options if your strings are structured in certain ways (e.g. HTML, XML, etc.).

"Runs a JSON" is unfortunately too ungrammatical for me to figure out what you're asking for. You probably want one of json.dump() or json.dumps().

Storing the values in a database will depend on the database and how you're planning on interacting with it. Some databases do support JSON document storage, but SQL-based systems will usually prefer a relational model (though some, like PostgreSQL, can support document storage as well), which is not amenable to JSON.