Convert String into Json Format

Hi,
I need to pass Json String in Http activity Body section for raw data.
However, I’m not able to convert String into Json format.
I tried to use the expression : Newtonsoft.Json.JsonConvert.SerializeObject(String)
to convert String into Json format, But it’s giving error as “Please provide valid json input”.

Any help would be appreciated.

Thanks,
Shantanu

Hello,

Could you please share the string?

It is important that the input string format is correct. JSON works on key value Pair, thus the initial formatting of the input string matters.

For example:

{“name”:“John”, “age”:30, “car”:null}

It defines an object with 3 properties:

  • name
  • age
  • car
    Each property has a value.

Once you have “Input String” correctly defined, you can use Serialize JSON Activity.