A high-performance 100% compatible drop-in replacement of "encoding/json"
-
Updated
Feb 14, 2022 - Go
We want to implement a custom method with payload key name as metricValues, but the proper ruby method name should be snake_case.
class MetricPeriodSerializer < Panko::Serializer
attributes :period, :metricValues
def metricValues
[{
'name' => 'metric1',
'value' => object.metric_1
},
{
Add a description, image, and links to the serializer topic page so that developers can more easily learn about it.
To associate your repository with the serializer topic, visit your repo's landing page and select "manage topics."
Triples within a TriplesBlock are list elements. E.g.: