Send feedback
Class Payload.JsonPayload (3.5.3)
bookmark_border bookmark
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.5.3 keyboard_arrow_down
public static final class Payload . JsonPayload extends Payload<Struct>
A log entry's JSON payload.
Inherited Members
Methods
getDataAsMap()
public Map<String , Object > getDataAsMap ()
Returns the log entry's JSON data as an unmodifiable map.
Returns
of(Struct data)
public static Payload . JsonPayload of ( Struct data )
Creates a log entry payload given its JSON data represented as a protobuf struct.
Parameter
Returns
of(Map<String,?> data)
public static Payload . JsonPayload of ( Map<String , ? > data )
Creates a log entry payload given its JSON data represented as a map. The provided map is
copied into a Struct object.
Notice that all numbers (int, long, float and double) are serialized as double values.
Enums are serialized as strings.
Example usage of JsonPayload
:
List<Long> listValue = Arrays . asList ( 1L , 2L );
Map
Parameter
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-05 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[],[]]