Groovy multi-line string uses 3 "
so
def jsony = """
{
"myJson": "isjson"
}
"""
On Tue, Jan 29, 2019 at 7:08 AM Panneer <[email protected]> wrote:
> Hi,
>
> correct. I am using JSON format only.. But jenkin not accepting your
> suggested format .
> Already i tried.
>
> Thanks
> Panneer
>
>
>
> On Tuesday, January 29, 2019 at 12:13:37 AM UTC-7, Xiaojie Zhao wrote:
>>
>> Are you going to use this as a json string? You might consider the below
>> example:
>>
>> node {
>> def abc = '''
>> {"ttd1": [{:php2val2"}:{"Version" : "02.02.42"}
>> '''
>>
>> echo abc
>> }
>>
>> On Tue, Jan 29, 2019 at 8:47 AM Panneer <[email protected]> wrote:
>>
>>> Hi All,
>>>
>>> I want to insert a character in a string at a certain position in
>>> Groovy pipeline. e.g is here below
>>>
>>> sam1 = {"ttd1": [{:php2val2"}:{"Version" : "02.02.42"}
>>>
>>> i want to convert the above data into below format for curl comman.
>>>
>>> sam2 = {\"ttd1\": [{\"php2val2\"}:{\"Version"\ : \"02.02.42\"}
>>>
>>> Please guide me on this.. I tried with replaceAll but not working.
>>>
>>> Regards
>>> Panneer
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/3558f89a-c446-4a3a-a45c-583f6012feb2%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/3558f89a-c446-4a3a-a45c-583f6012feb2%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> https://github.com/LinuxSuRen
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/7cd20057-d1d2-48fa-9126-1d71672bdbe7%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/7cd20057-d1d2-48fa-9126-1d71672bdbe7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9LEF1sy6AaZjr%2B%2BKDpcA-HRB3uM6bLWRhhApoa%2B-AKQaA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.