Single quotes string

Hi Team,

Beginner here.


I need to send a message to a Kafka topic that's used by another team. To do this, we're using a plugin that accepts messages(parameter) as text. The message I need to send is a dictionary in Appian, and I'm converting it into a JSON string using a!toJson(). so that the other team can parse it. However, the other team expects the dictionary to be enclosed in single quotes, like this: '{"a": "hello", "b": 1}'.

I have few questions:

  1. Is it possible to create such string enclosed in single quotes in Appian?
  2. In the Expression Editor's output tab, there are three formats: "formatted," "raw," and "expression." Which one should I consider as a output. I mean the output format we see will be different while passing into pv! right. for example {"a","b","c"} will be shown in the output as below(image), but in the instance if we look at the PV! it will be something like a;b;c

    I'm assuming formatted is the correct one. a!tojson({ "a":"hello", "b":"world", "c":23 }) will result in  but another team expecting it to be something like this '{"a":"hello","b":"world","c":23}' (with single quotes)


    Thanks in advance







      
     

  Discussion posts and replies are publicly visible

Parents Reply Children