frm/types.go
Adriano Caloiaro caa95c66b6
initial commit
2024-12-16 17:01:53 -07:00

20 lines
297 B
Go

package frm
import (
"encoding/json"
"github.com/acaloiaro/frm/internal"
)
// Form is a form
type Form internal.Form
// JSON returns the form's JSON-seralized string representation
func (f Form) JSON() string {
b, err := json.Marshal(f)
if err != nil {
return ""
}
return string(b)
}