• Resolved canebullo

    (@canebullo)


    hello,

    i’m in trouble with my import because i need to save a particular custom field in this format:
    {“administrator”:””,”customer”:”MY FIELD”,”trade”:””,”pro”:””}

    if i set the custom field as serialize this is saved in this format:
    a:4:{s:13:”administrator”;s:0:””;s:8:”customer”;s:3:”195″;s:5:”trade”;s:0:””;s:3:”pro”;s:0:””;}

    i need to understand how to make a function that converts the serialialized format in json.

    any help or advice are welcome!
    thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @canebullo

    You should be able to save the JSON in a regular custom field, just be sure to escape the curly braces with backslashes:

    \{"administrator":"","customer":"MY FIELD","trade":"","pro":""\}

    Thread Starter canebullo

    (@canebullo)

    brilliant!

    it’s works fine. thanks you so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Save serialize custom field in json’ is closed to new replies.