jlelse
/
hugo-micropub
Archived
1
Fork 0

Fix JSON unmarshal

This commit is contained in:
Jan-Lukas Else 2019-12-22 10:23:57 +01:00
parent 9aab54619a
commit 6fc525ce5e
1 changed files with 2 additions and 2 deletions

View File

@ -3,9 +3,9 @@ package main
import (
"bufio"
"bytes"
"encoding/json"
"errors"
"fmt"
"gopkg.in/yaml.v2"
"io/ioutil"
"math/rand"
"net/http"
@ -55,7 +55,7 @@ func CreateEntry(contentType ContentType, r *http.Request) (*Entry, error) {
return nil, err
}
parsedMfItem := &MicroformatItem{}
err = yaml.Unmarshal([]byte(bodyString), &parsedMfItem)
err = json.Unmarshal([]byte(bodyString), &parsedMfItem)
if err != nil {
return nil, errors.New("failed to parse Json")
}