There are contributed modules that will help with this that are listed below. You can also use Form API's #attributes to add in an HTML5 placeholder.
Here's an example using Drupal Form API:
There is a great article that shows how all of the Acquia sites are architected. In that article, it is mentioned that Services is used quite a bit to power REST endpoints. Here is a really, really, useful tidbit that I don't want to forget which comes from that article.