title: Add attributes to element from JSON using Vue.js
body: <p>I am using Vue.js V1 and want to take some JSON like this:</p>
  
  <pre><code>{ "class": "foo bar", "max-length": 25 }
  </code></pre>
  
  <p>And map it to an element so something like this:</p>
  
  <pre><code>&lt;input type="text" {{ json }} /&gt;
  </code></pre>
  
  <p>And that renders as:</p>
  
  <pre><code>&lt;input type="text" class="foo bar" max-length="25" /&gt;
  </code></pre>
  
  <p>I have tried this with a method <code>&lt;input type="text" {{ convertJSON(json) }} /&gt;</code> where <code>convertJSON</code> creates a string from the JSON. This doesn't work. When I transpile with it vueify it gives me the error “Found camel case attribute”.</p>
  
  <p>Is this possible with Vue?</p>
  
  <p>EDIT: I want to do it without having to go through each attribute manually; I already know how to bind them. I wondered if it was possible to do it dynamically. I suspect it isn't but wanted to check.</p>
  
  <p>Thanks.</p>