...

Source file src/github.com/ory/x/jsonx/helpers.go

Documentation: github.com/ory/x/jsonx

     1  package jsonx
     2  
     3  import (
     4  	"encoding/json"
     5  	"testing"
     6  
     7  	"github.com/stretchr/testify/require"
     8  )
     9  
    10  func TestMarshalJSONString(t *testing.T, i interface{}) string {
    11  	out, err := json.Marshal(i)
    12  	require.NoError(t, err)
    13  	return string(out)
    14  }
    15  
    16  func TestUnmarshalJSON(t *testing.T, in []byte, i interface{}) {
    17  	require.NoError(t, json.Unmarshal(in, i))
    18  }
    19  

View as plain text