Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pquerna/ffjson
/ functions
Functions
575 in github.com/pquerna/ffjson
⨍
Functions
575
◇
Types & classes
395
↓ 2 callers
Function
adjustLastDigit
adjustLastDigit modifies d = x-currentDiff*ε, to get closest to d = x-targetDiff*ε, without becoming smaller than x-maxDiff*ε. It assumes that a decim
fflib/v1/extfloat.go:645
↓ 2 callers
Function
adjustLastDigit
adjustLastDigit modifies d = x-currentDiff*ε, to get closest to d = x-targetDiff*ε, without becoming smaller than x-maxDiff*ε. It assumes that a decim
fflib/v1/internal/extfloat.go:645
↓ 2 callers
Function
digitZero
(dst []byte)
fflib/v1/decimal.go:61
↓ 2 callers
Function
digitZero
(dst []byte)
fflib/v1/internal/atof.go:619
↓ 2 callers
Function
emptyInterface
emptyInterface creates a new instance of the object sent It the returned interface is writable and contains the zero value.
tests/ff_test.go:252
↓ 2 callers
Function
extractFields
extractFields returns a list of fields that JSON should recognize for the given type. The algorithm is breadth-first search over the set of structs to
inception/reflect.go:130
↓ 2 callers
Function
fmtE
%e: -d.ddddde±dd
fflib/v1/ftoa.go:333
↓ 2 callers
Function
fmtE
%e: -d.ddddde±dd
fflib/v1/internal/ftoa.go:334
↓ 2 callers
Function
fmtF
%f: -ddddddd.ddddd
fflib/v1/ftoa.go:393
↓ 2 callers
Function
fmtF
%f: -ddddddd.ddddd
fflib/v1/internal/ftoa.go:401
↓ 2 callers
Function
formatBits
formatBits computes the string representation of u in the given base. If neg is set, u is treated as negative int64 value.
fflib/v1/ftoa.go:464
↓ 2 callers
Function
formatDigits
(dst EncodingBuffer, shortest bool, neg bool, digs decimalSlice, prec int, fmt byte)
fflib/v1/ftoa.go:185
↓ 2 callers
Function
formatDigits
(dst []byte, shortest bool, neg bool, digs decimalSlice, prec int, fmt byte)
fflib/v1/internal/ftoa.go:191
↓ 2 callers
Method
frexp10
Frexp10 is an analogue of math.Frexp for decimal powers. It scales f by an approximate power of ten 10^-exp, and returns exp10, so that f*10^exp10 has
fflib/v1/extfloat.go:336
↓ 2 callers
Method
frexp10
Frexp10 is an analogue of math.Frexp for decimal powers. It scales f by an approximate power of ten 10^-exp, and returns exp10, so that f*10^exp10 has
fflib/v1/internal/extfloat.go:336
↓ 2 callers
Function
genericFtoa
(dst []byte, val float64, fmt byte, prec, bitSize int)
fflib/v1/internal/ftoa.go:54
↓ 2 callers
Function
getBaseData
(b fatalF)
tests/go.stripe/stripe_test.go:83
↓ 2 callers
Function
getField
(ic *Inception, f *StructField, prefix string)
inception/encoder.go:434
↓ 2 callers
Function
getGetInnerValue
(ic *Inception, name string, typ reflect.Type, ptr bool, forceString bool)
inception/encoder.go:133
↓ 2 callers
Function
getXValue
(thing interface{})
tests/ff_test.go:407
↓ 2 callers
Function
getu4
getu4 decodes \uXXXX from the beginning of s, returning the hex value, or it returns -1.
fflib/v1/jsonstring.go:243
↓ 2 callers
Function
lastConditional
We check if the last field is conditional.
inception/encoder.go:475
↓ 2 callers
Function
leftShift
Binary shift left (/ 2) by k bits. k <= maxShift to avoid overflow.
fflib/v1/decimal.go:232
↓ 2 callers
Function
leftShift
Binary shift left (/ 2) by k bits. k <= maxShift to avoid overflow.
fflib/v1/internal/atof.go:790
↓ 2 callers
Function
min
(a, b int)
fflib/v1/ftoa.go:448
↓ 2 callers
Function
readFloat
readFloat reads a decimal mantissa and exponent from a float string representation. It sets ok to false if the number could not fit return types or is
fflib/v1/internal/atof.go:176
↓ 2 callers
Method
readSlice
readSlice is like ReadBytes but returns a reference to internal buffer data.
fflib/v1/buffer.go:381
↓ 2 callers
Method
readU4
(j int)
fflib/v1/reader.go:132
↓ 2 callers
Method
renderTpl
(f *os.File, t *template.Template, tc *templateCtx)
generator/inceptionmain.go:153
↓ 2 callers
Function
reseed
()
generator/tempfile.go:22
↓ 2 callers
Function
rightShift
Binary shift right (* 2) by k bits. k <= maxShift to avoid overflow.
fflib/v1/decimal.go:109
↓ 2 callers
Function
rightShift
Binary shift right (* 2) by k bits. k <= maxShift to avoid overflow.
fflib/v1/internal/atof.go:667
↓ 2 callers
Method
scanField
(start FFTok, capture bool)
fflib/v1/lexer.go:482
↓ 2 callers
Function
scanToTokCount
(ffl *FFLexer, targetTok FFTok)
fflib/v1/lexer_test.go:61
↓ 2 callers
Method
set
(s []byte)
fflib/v1/internal/atof.go:83
↓ 2 callers
Function
shouldRoundUp
If we chop a at nd digits, should we round up?
fflib/v1/decimal.go:298
↓ 2 callers
Function
shouldRoundUp
If we chop a at nd digits, should we round up?
fflib/v1/internal/atof.go:856
↓ 2 callers
Function
special
(s []byte)
fflib/v1/internal/atof.go:56
↓ 2 callers
Function
tError
(t *testing.T, input string, targetCount int, targetError FFErr)
fflib/v1/lexer_test.go:271
↓ 1 callers
Method
Add
(obj shared.InceptionType)
inception/inception.go:60
↓ 1 callers
Method
AssignComputeBounds
AssignComputeBounds sets f to the floating point value defined by mant, exp and precision given by flt. It returns lower, upper such that any number i
fflib/v1/extfloat.go:176
↓ 1 callers
Method
AssignComputeBounds
AssignComputeBounds sets f to the floating point value defined by mant, exp and precision given by flt. It returns lower, upper such that any number i
fflib/v1/internal/extfloat.go:176
↓ 1 callers
Method
CaptureField
Captures an entire field value, including recursive objects, and converts them to a []byte suitable to pass to a sub-object's UnmarshalJSON
fflib/v1/lexer.go:564
↓ 1 callers
Function
CreateMarshalJSON
(ic *Inception, si *StructInfo)
inception/encoder.go:483
↓ 1 callers
Function
CreateUnmarshalJSON
(ic *Inception, si *StructInfo)
inception/decoder.go:38
↓ 1 callers
Function
ExtractStructs
(inputPath string)
generator/parser.go:85
↓ 1 callers
Method
FixedDecimal
FixedDecimal stores in d the first n significant digits of the decimal representation of f. It returns false if it cannot be sure of the answer.
fflib/v1/extfloat.go:378
↓ 1 callers
Method
FixedDecimal
FixedDecimal stores in d the first n significant digits of the decimal representation of f. It returns false if it cannot be sure of the answer.
fflib/v1/internal/extfloat.go:378
↓ 1 callers
Function
FormatBits2
FormatBits2 computes the string representation of u in the given base. If neg is set, u is treated as negative int64 value. If append_ is set, the str
fflib/v1/iota.go:83
↓ 1 callers
Method
Generate
(packageName string, si []*StructInfo, importName string)
generator/inceptionmain.go:167
↓ 1 callers
Function
Marshal
Marshal will act the same way as json.Marshal, except it will choose the ffjson marshal function before falling back to using json.Marshal. Using this
ffjson/marshal.go:42
↓ 1 callers
Function
NewInceptionMain
(goCmd string, inputPath string, outputPath string, resetFields bool)
generator/inceptionmain.go:101
↓ 1 callers
Function
NewStructInfo
(name string)
generator/parser.go:44
↓ 1 callers
Function
NewStructInfo
(obj shared.InceptionType)
inception/reflect.go:57
↓ 1 callers
Function
ParseUint
ParseUint is like ParseInt but for unsigned numbers, and oeprating on []byte
fflib/v1/bytenum.go:34
↓ 1 callers
Function
ParseUint
ParseUint is like ParseInt but for unsigned numbers, and oeprating on []byte
fflib/v1/internal/atoi.go:69
↓ 1 callers
Function
Pool
Send a buffer to the Pool to reuse for other instances. On servers where you have a lot of concurrent encoding going on, you can hand back the byte b
ffjson/pool.go:31
↓ 1 callers
Method
Read
Read reads the next len(p) bytes from the buffer or until the buffer is drained. The return value n is the number of bytes read. If the buffer has n
fflib/v1/buffer.go:304
↓ 1 callers
Method
ReadByteNoWS
()
fflib/v1/reader.go:78
↓ 1 callers
Function
RenderTemplate
(ic *Inception)
inception/template.go:43
↓ 1 callers
Method
RoundedInteger
Extract integer part, rounded appropriately. No guarantees about overflow.
fflib/v1/internal/atof.go:920
↓ 1 callers
Method
Run
()
generator/inceptionmain.go:226
↓ 1 callers
Method
ShortestDecimal
ShortestDecimal stores in d the shortest decimal representation of f which belongs to the open interval (lower, upper), where f is supposed to lie. It
fflib/v1/extfloat.go:532
↓ 1 callers
Method
ShortestDecimal
ShortestDecimal stores in d the shortest decimal representation of f which belongs to the open interval (lower, upper), where f is supposed to lie. It
fflib/v1/internal/extfloat.go:532
↓ 1 callers
Method
Sort
()
inception/inception.go:98
↓ 1 callers
Function
TempFileWithPostfix
TempFile creates a new temporary file in the directory dir with a name beginning with prefix, opens the file for reading and writing, and returns the
generator/tempfile.go:47
↓ 1 callers
Function
Unmarshal
Unmarshal will act the same way as json.Unmarshal, except it will choose the ffjson unmarshal function before falling back to using json.Unmarshal. Th
ffjson/marshal.go:84
↓ 1 callers
Method
UnreadByte
()
fflib/v1/reader.go:124
↓ 1 callers
Method
WrapErr
(err error)
fflib/v1/lexer.go:145
↓ 1 callers
Function
adjustLastDigitFixed
adjustLastDigitFixed assumes d contains the representation of the integral part of some number, whose fractional part is num / (den << shift). The num
fflib/v1/extfloat.go:496
↓ 1 callers
Function
adjustLastDigitFixed
adjustLastDigitFixed assumes d contains the representation of the integral part of some number, whose fractional part is num / (den << shift). The num
fflib/v1/internal/extfloat.go:496
↓ 1 callers
Function
atof32
(s []byte)
fflib/v1/internal/atof.go:455
↓ 1 callers
Function
atof32exact
If possible to compute mantissa*10^exp to 32-bit float f exactly, entirely in floating-point math, do so, avoiding the machinery above.
fflib/v1/internal/atof.go:422
↓ 1 callers
Function
atof64
(s []byte)
fflib/v1/internal/atof.go:494
↓ 1 callers
Function
atof64exact
If possible to convert decimal representation to 64-bit float f exactly, entirely in floating-point math, do so, avoiding the expense of decimalToFloa
fflib/v1/internal/atof.go:388
↓ 1 callers
Function
cutoff64
Return the first number n such that n*base >= 1<<64.
fflib/v1/internal/atoi.go:61
↓ 1 callers
Function
dominantField
dominantField looks through the fields, all of which are known to have the same name, to find the single field that dominates the others using Go's em
inception/reflect.go:268
↓ 1 callers
Function
fmtB
%b: -ddddddddp±ddd
fflib/v1/ftoa.go:426
↓ 1 callers
Function
fmtB
%b: -ddddddddp+ddd
fflib/v1/internal/ftoa.go:436
↓ 1 callers
Function
foldFunc
(key []byte)
inception/reflect.go:90
↓ 1 callers
Function
frexp10Many
frexp10Many applies a common shift by a power of ten to a, b, c.
fflib/v1/extfloat.go:368
↓ 1 callers
Function
frexp10Many
frexp10Many applies a common shift by a power of ten to a, b, c.
fflib/v1/internal/extfloat.go:368
↓ 1 callers
Function
fuzzTime
Return a time no later than 5000 years from unix datum. JSON cannot handle dates after year 9999.
tests/fuzz_test.go:122
↓ 1 callers
Method
generateCode
()
inception/inception.go:100
↓ 1 callers
Function
getArrayHandler
(ic *Inception, name string, typ reflect.Type, ptr bool)
inception/decoder.go:193
↓ 1 callers
Function
getExposePath
(inputPath string)
generator/inceptionmain.go:149
↓ 1 callers
Function
getImportName
(goCmd, inputPath string)
generator/inceptionmain.go:112
↓ 1 callers
Function
getMapValue
(ic *Inception, name string, typ reflect.Type, ptr bool, forceString bool)
inception/encoder.go:80
↓ 1 callers
Function
getOmitEmpty
(ic *Inception, sf *StructField)
inception/encoder.go:42
↓ 1 callers
Function
getTotalSize
(si *StructInfo)
inception/encoder.go:404
↓ 1 callers
Function
getTypeSize
(t reflect.Type)
inception/encoder.go:371
↓ 1 callers
Function
getValue
(ic *Inception, sf *StructField, prefix string)
inception/encoder.go:326
↓ 1 callers
Method
handleEscaped
(c byte, j int, out DecodingBuffer)
fflib/v1/reader.go:158
↓ 1 callers
Function
handleFieldAddr
(ic *Inception, name string, takeAddr bool, typ reflect.Type, ptr bool, quoted bool)
inception/decoder.go:67
↓ 1 callers
Function
isValidTag
(s string)
inception/tags.go:62
↓ 1 callers
Method
lexComment
()
fflib/v1/lexer.go:213
↓ 1 callers
Method
lexNumber
()
fflib/v1/lexer.go:285
↓ 1 callers
Method
lexString
()
fflib/v1/lexer.go:260
↓ 1 callers
Function
nextSuffix
()
generator/tempfile.go:26
↓ 1 callers
Function
p2
(v uint32)
inception/encoder.go:360
← previous
next →
101–200 of 575, ranked by callers