How to send anchor with REST JSON?

Hi there

I want to send anchor between text in JSON How can I do this?

Like Example

“TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextLinkTextTextTextTextTextTextTextText”

although I can send data in this format but problem is extracting hyperlink from it in receving client.(android,iOS)

(Don’t know where to post so posted in PHP category,moderator if I have posted in wrong category then please move it to proper category)

send url (href) and label in seperate JSON nodes. Let the client choose how to deal with it.

1 Like

in my case I have to send anchor between text

and what did you try to extract the link within your application? regex may match that.

This statement quite contradicts with the task description. And with common sense too.

Besides, any reason you cannot send the same link in the additional field?

I am sending REST web service of a blog that contain html links anchor,images,strong,bold etc…

client will parse them as per their requirement

Do I need to explain it more?

sounds like you just need to treat the whole lot as plain text then if the client is going to parse any tags contained in that text as they require.

yes this is my requirement

so what is the problem?

Where is the text with embedded link coming from - there is no issue with it once you have the text in a variable so is the problem getting the text into a variable without breaking the link?

yes this is problem to get href attribute of anchor tag.

I can get tag sepration easily

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.