mirror of
https://github.com/acaloiaro/frm
synced 2026-07-21 18:29:12 +00:00
20 lines
297 B
Go
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)
|
|
}
|