<template>
  <div>
    <kyb-json v-model="value" />
    {{value}}
  </div>
</template>
<style>
</style>
<script>
// import _ from 'underscore'
// import KTest from 'components/k-test'
// import mqtt from 'mqtt'

let ll = {
  name: 'joey',
  sex: '男',
  age: 18,
  test: [
    {
      name: 'joey',
      sex: '男',
      isOK: true,
      age: 18.5
    },
    {
      name: 'joey',
      sex: '男',
      age: 18
    },
    {
      name: 'joey',
      sex: '男',
      age: 18
    }
  ]
}

let d = {
  data: function() {
    return {
      value: JSON.stringify(ll)
    }
  },
  computed: {},
  created() {
    // console.log('hello 0 ')
    // var client = mqtt.connect('ws://localhost:3000')
    // console.log('hello 1')
    // client.subscribe('mqtt/demo')
    // console.log('hello 12')
    // client.on('message', function (topic, payload) {
    //   alert([topic, payload].join(': '))
    //   client.end()
    // })
    // client.publish('mqtt/demo', 'hello world!')
  },
  methods: {
    input(a) {
      this.value = a
    }
  }
}
export default d
</script>
