Skip to content

TethysBuilder doesn't produce json from Foldable #1358

@NarekDW

Description

@NarekDW

Example

def json[A: Loggable](a: A) = TethysBuilder(a)

@derive(loggable)
final case class X(field: String)

val result = json(List(X("value")))

Expected:

[{"field":"value"}]

Actual

{}

I think this issue occurs due to how fldLoggable is constructed, particularly in this part:

def fields[I, V, R, M](a: A, input: I)(implicit receiver: LogRenderer[I, V, R, M]): R = input.noop

I'm not sure how this could be fixed without introducing significant changes...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions