Lines Matching refs:marshaler
56 marshaler = Marshaler{} var
410 marshaler Marshaler
414 {"simple flat object", marshaler, simpleObject, simpleObjectOutputJSON},
416 {"non-finite floats fields object", marshaler, nonFinites, nonFinitesJSON},
417 {"repeated fields flat object", marshaler, repeatsObject, repeatsObjectJSON},
419 {"nested message/enum flat object", marshaler, complexObject, complexObjectJSON},
439 {"empty value", marshaler, &pb.Simple3{}, `{}`},
444 …{"map<int64, int32>", marshaler, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, `{"nummy":{"1":2,"…
446 {"map<string, string>", marshaler,
449 {"map<int32, Object>", marshaler,
453 {"map<int64, string>", marshaler, &pb.Mappy{Buggy: map[int64]string{1234: "yup"}},
455 …{"map<bool, bool>", marshaler, &pb.Mappy{Booly: map[bool]bool{false: true}}, `{"booly":{"false":tr…
456 …{"map<string, enum>", marshaler, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}},…
458 …{"map<int32, bool>", marshaler, &pb.Mappy{S32Booly: map[int32]bool{1: true, 3: false, 10: true, 12…
459 …{"map<int64, bool>", marshaler, &pb.Mappy{S64Booly: map[int64]bool{1: true, 3: false, 10: true, 12…
460 …{"map<uint32, bool>", marshaler, &pb.Mappy{U32Booly: map[uint32]bool{1: true, 3: false, 10: true, …
461 …{"map<uint64, bool>", marshaler, &pb.Mappy{U64Booly: map[uint64]bool{1: true, 3: false, 10: true, …
462 {"proto2 map<int64, string>", marshaler, &pb.Maps{MInt64Str: map[int64]string{213: "cat"}},
464 {"proto2 map<bool, Object>", marshaler,
467 {"oneof, not set", marshaler, &pb.MsgWithOneof{}, `{}`},
468 …{"oneof, set", marshaler, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Title{"Grand Poobah"}}, `{"titl…
471 {"proto2 extension", marshaler, realNumber, realNumberJSON},
472 {"Any with message", marshaler, anySimple, anySimpleJSON},
474 {"Any with WKT", marshaler, anyWellKnown, anyWellKnownJSON},
476 {"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}, `{"dur":"3s"}`},
477 …{"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3, Nanos: 1e6}}, `{"dur":"3.0…
478 …{"Duration beyond float64 precision", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 1000…
479 …{"negative Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: -123, Nanos: -456}},…
480 {"Struct", marshaler, &pb.KnownTypes{St: &stpb.Struct{
486 {"empty ListValue", marshaler, &pb.KnownTypes{Lv: &stpb.ListValue{}}, `{"lv":[]}`},
487 {"basic ListValue", marshaler, &pb.KnownTypes{Lv: &stpb.ListValue{Values: []*stpb.Value{
493 …{"Timestamp", marshaler, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 21e6}}, `{"ts":"…
494 …{"Timestamp", marshaler, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 0}}, `{"ts":"201…
495 …{"number Value", marshaler, &pb.KnownTypes{Val: &stpb.Value{Kind: &stpb.Value_NumberValue{1}}}, `{…
496 …{"null Value", marshaler, &pb.KnownTypes{Val: &stpb.Value{Kind: &stpb.Value_NullValue{stpb.NullVal…
497 …{"string number value", marshaler, &pb.KnownTypes{Val: &stpb.Value{Kind: &stpb.Value_StringValue{"…
498 {"list of lists Value", marshaler, &pb.KnownTypes{Val: &stpb.Value{
514 {"DoubleValue", marshaler, &pb.KnownTypes{Dbl: &wpb.DoubleValue{Value: 1.2}}, `{"dbl":1.2}`},
515 {"FloatValue", marshaler, &pb.KnownTypes{Flt: &wpb.FloatValue{Value: 1.2}}, `{"flt":1.2}`},
516 {"Int64Value", marshaler, &pb.KnownTypes{I64: &wpb.Int64Value{Value: -3}}, `{"i64":"-3"}`},
517 {"UInt64Value", marshaler, &pb.KnownTypes{U64: &wpb.UInt64Value{Value: 3}}, `{"u64":"3"}`},
518 {"Int32Value", marshaler, &pb.KnownTypes{I32: &wpb.Int32Value{Value: -4}}, `{"i32":-4}`},
519 {"UInt32Value", marshaler, &pb.KnownTypes{U32: &wpb.UInt32Value{Value: 4}}, `{"u32":4}`},
520 {"BoolValue", marshaler, &pb.KnownTypes{Bool: &wpb.BoolValue{Value: true}}, `{"bool":true}`},
521 …{"StringValue", marshaler, &pb.KnownTypes{Str: &wpb.StringValue{Value: "plush"}}, `{"str":"plush"}…
522 …{"BytesValue", marshaler, &pb.KnownTypes{Bytes: &wpb.BytesValue{Value: []byte("wow")}}, `{"bytes":…
524 {"required", marshaler, &pb.MsgWithRequired{Str: proto.String("hello")}, `{"str":"hello"}`},
525 {"required bytes", marshaler, &pb.MsgWithRequiredBytes{Byts: []byte{}}, `{"byts":""}`},
530 json, err := tt.marshaler.MarshalToString(tt.pb)
563 _, err := marshaler.MarshalToString(tt.pb)
623 marshaler *Marshaler
628 marshaler: &Marshaler{},
633 marshaler: &Marshaler{EmitDefaults: true},
638 marshaler: &Marshaler{},
643 marshaler: &Marshaler{EmitDefaults: true},
648 marshaler: &Marshaler{},
653 marshaler: &Marshaler{EmitDefaults: true},
658 marshaler: &Marshaler{},
663 marshaler: &Marshaler{},
672 marshaler: &Marshaler{},
682 marshaler: &Marshaler{},
689 marshaler: &Marshaler{},
695 if _, err := tc.marshaler.MarshalToString(tc.pb); err == nil {