func (j *JSONParser) Init(b *bytes.Buffer) bool {
	m := make(map[string]interface{})
	err := json.Unmarshal(b.Bytes(), &m)
	if err != nil {
		var offset int
		jerr, ok := err.(*json.SyntaxError)
		if !ok {
			return false
		}
		offset = int(jerr.Offset)
		m = make(map[string]interface{})
		err = json.Unmarshal(b.Next(offset-1), &m)
		if err != nil {
			return false
		}
	}
	j.metadata = NewMetadata(m)
	j.markdown = bytes.NewBuffer(b.Bytes())
	return true
}
Init prepares the metadata metadata/markdown file and parses it
package metadata
import (
	"bytes"
	"encoding/json"
)
type JSONParser struct {
	metadata Metadata
	markdown *bytes.Buffer
}
func (j *JSONParser) Type() string {
	return "JSON"
}