Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JSON instead of XML for messages input #51

Open
OiYouYeahYou opened this issue Sep 6, 2017 · 0 comments
Open

Use JSON instead of XML for messages input #51

OiYouYeahYou opened this issue Sep 6, 2017 · 0 comments

Comments

@OiYouYeahYou
Copy link

I would suggest that you change your Messages location into JSON. Reducing code liability into JSON.parse( xhrContent ) Making long term maintenance much better.

It would look like this

[
	{ "show" : "true" },
	{
		"num" : 15,
		"date" : "2015/04/11",
		"text" : "YouTube is having some issues removing videos at the moment. Clicking remove *will* clear the video, however it may take some time to register and subsequently may show for a while after the page is refreshed. If you refresh the page a few times then YouTube should catch up and eventually not show the video.",
		"ttl" : 7
	}
]

Instead of this

<?xml version="1.0" encoding="utf-8"?>
<messages>
	<show>true</show>
	<message>
		<num>15</num>
		<date>11th Apr 2015</date>
		<text>YouTube is having some issues removing videos at the moment. Clicking remove *will* clear the video, however it may take some time to register and subsequently may show for a while after the page is refreshed. If you refresh the page a few times then YouTube should catch up and eventually not show the video.</text>
		<!-- Time to live of the message in days -->
		<ttl>7</ttl>
	</message>
</messages>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant