Proper way to store json in database

David542

Does json usually have enclosing quotation marks when stored in a database field?

Which of the following would be correct for the json column?

`json`
'{"Color": "Red"}'
 {"Color": "Red"}

My assumption would be the second, but just wanted to make sure that's correct. And if so, why?

Jakub Lortz

As of MySQL 5.7.8, MySQL supports a native JSON data type

If you use earlier version and store it as text, store it without the enclosing quotation marks.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Proper way to pull JSON API response and store or reference it in Swift?

From Dev

Proper way to manipulate database

From Dev

Proper way to store GUID in sqlite

From Dev

Proper way to store GUID in sqlite

From Dev

Proper way to migrate a postgres database?

From Dev

"Proper" place to store description about a MySQL database

From Dev

What is the proper way to store an expiration date/timestamp?

From Dev

What is the proper way to store items using Shelve?

From Dev

Python - Proper way to store passwords with scrypt?

From Dev

Proper way to store public and private files in a Cloud

From Dev

proper way to store class instances in python app

From Dev

Proper way to store certificates in android and their management in future

From Dev

Proper way to store boolean in CoreData Swift

From Dev

The proper way to store/load statics in Ember App

From Dev

Proper way of rendering Json in html

From Dev

What is proper way to upload a image to a MySQL database?

From Dev

Proper way to clear Realm table/database?

From Dev

What is proper way to initialize SQLite database?

From Java

Best way to store password in database

From Dev

Best way to store a date in a database

From Dev

Proper way of using Newtonsoft Json ItemConverterType

From Java

Proper way to return JSON using node or Express

From Dev

Proper way to declare JSON object in Typescript

From Dev

Proper way to get the byte array from the JSON

From Dev

Proper way to declare JSON object in Typescript

From Dev

Where is the proper location for an application to store a large database on Windows?

From Dev

What is the proper way to store yes/no/unknown values for a field?

From Dev

What is the proper way to store persistent variables in Ember RESTAdapter

From Dev

What's the proper way to store this data in a MySQL schema?

Related Related

  1. 1

    Proper way to pull JSON API response and store or reference it in Swift?

  2. 2

    Proper way to manipulate database

  3. 3

    Proper way to store GUID in sqlite

  4. 4

    Proper way to store GUID in sqlite

  5. 5

    Proper way to migrate a postgres database?

  6. 6

    "Proper" place to store description about a MySQL database

  7. 7

    What is the proper way to store an expiration date/timestamp?

  8. 8

    What is the proper way to store items using Shelve?

  9. 9

    Python - Proper way to store passwords with scrypt?

  10. 10

    Proper way to store public and private files in a Cloud

  11. 11

    proper way to store class instances in python app

  12. 12

    Proper way to store certificates in android and their management in future

  13. 13

    Proper way to store boolean in CoreData Swift

  14. 14

    The proper way to store/load statics in Ember App

  15. 15

    Proper way of rendering Json in html

  16. 16

    What is proper way to upload a image to a MySQL database?

  17. 17

    Proper way to clear Realm table/database?

  18. 18

    What is proper way to initialize SQLite database?

  19. 19

    Best way to store password in database

  20. 20

    Best way to store a date in a database

  21. 21

    Proper way of using Newtonsoft Json ItemConverterType

  22. 22

    Proper way to return JSON using node or Express

  23. 23

    Proper way to declare JSON object in Typescript

  24. 24

    Proper way to get the byte array from the JSON

  25. 25

    Proper way to declare JSON object in Typescript

  26. 26

    Where is the proper location for an application to store a large database on Windows?

  27. 27

    What is the proper way to store yes/no/unknown values for a field?

  28. 28

    What is the proper way to store persistent variables in Ember RESTAdapter

  29. 29

    What's the proper way to store this data in a MySQL schema?

HotTag

Archive