func (j *AccountCreateExtensions) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
	if j == nil {
		buf.WriteString("null")
		return nil
	}
	var err error
	var obj []byte
	_ = obj
	_ = err
	buf.WriteString(`{ `)
	if j.NullExt != nil {
		if true {
			buf.WriteString(`"null_ext":`)
			{
				err = j.NullExt.MarshalJSONBuf(buf)
				if err != nil {
					return err
				}
			}
			buf.WriteByte(',')
		}
	}
	if j.OwnerSpecialAuthority != nil {
		if true {
			buf.WriteString(`"owner_special_authority":`)
			{
				obj, err = j.OwnerSpecialAuthority.MarshalJSON()
				if err != nil {
					return err
				}
				buf.Write(obj)
			}
			buf.WriteByte(',')
		}
	}
	if j.ActiveSpecialAuthority != nil {
		if true {
			buf.WriteString(`"active_special_authority":`)
			{
				obj, err = j.ActiveSpecialAuthority.MarshalJSON()
				if err != nil {
					return err
				}
				buf.Write(obj)
			}
			buf.WriteByte(',')
		}
	}
	if j.BuybackOptions != nil {
		if true {
			buf.WriteString(`"buyback_options":`)
			{
				err = j.BuybackOptions.MarshalJSONBuf(buf)
				if err != nil {
					return err
				}
			}
			buf.WriteByte(',')
		}
	}
	buf.Rewind(1)
	buf.WriteByte('}')
	return nil
}
MarshalJSONBuf marshal buff to json - template
package types
import (
	"bytes"
	"fmt"
	fflib "github.com/pquerna/ffjson/fflib/v1"
)
func (j *AccountCreateExtensions) MarshalJSON() ([]byte, error) {
	var buf fflib.Buffer
	if j == nil {
		buf.WriteString("null")
		return buf.Bytes(), nil
	}
	err := j.MarshalJSONBuf(&buf)
	if err != nil {
		return nil, err
	}
	return buf.Bytes(), nil
}