I am using passbook, and have some input value, like this:
{
"key" : "terms",
"label" : "terms_contions",
"value" : "1.aaaaaaa
2.bbbbbbb
3.ccccccc
4.ddddddd
}
I use "enter" key, I want to newline to see the value, but the pass show mistake.
so I modify it to:
{
"key" : "terms",
"label" : "terms_contions",
"value" : "1.aaaaaaa 2.bbbbbbb 3.ccccccc 4.ddddddd
}
and all is ok, but I do not want 1. 2. 3. 4. at one line. I want to have 4 lines. How can I accomplish this?
Newlines will only work on back fields. Encode the newlines into the JSON like below and you should be OK.
{
"key" : "terms",
"label" : "terms_contions",
"value" : "1.aaaaaaa\r\n2.bbbbbbb\r\n3.ccccccc\r\n4.ddddddd"
}
Example working pass with newlines in the last backfield.
{
"key" : "terms",
"label" : "terms_contions",
"value" : "1.aaaaaaa\n 2.bbbbbbb\n 3.ccccccc\n 4.ddddddd
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With