1

I have converted an image into a BASE64 encoded string , and then i need plz someone to explain howto convert it as json string, and insert into DB

or else if any other ways is available to convert image as json string plz someone explain me

prus
  • 11
  • 1
  • 4
  • `convert image as json string` an image encoded to base64 gives you a string ... there's no reason to "convert" a string to JSON ... what key would you use for this object? or is it just a JSON encoded array? you only have a single string, no reason to stick it in an array - keep things simple - a base64 encoded image is fine to work with – Jaromanda X Dec 01 '16 at 08:17
  • Refer this http://stackoverflow.com/questions/4665049/json-encode-decode-base64-encode-decode-in-javascript – Parshuram Kalvikatte Dec 01 '16 at 09:15

1 Answers1

1

read here, you can use btoa (encode) and atob(decode) methods

harishr
  • 17,807
  • 9
  • 78
  • 125