{"action":"opened","issue":{"url":"https://api.github.com/repos/michaeledgar/protobuf-net/issues/24","labels_url":"https://api.github.com/repos/michaeledgar/protobuf-net/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/michaeledgar/protobuf-net/issues/24/comments","events_url":"https://api.github.com/repos/michaeledgar/protobuf-net/issues/24/events","html_url":"https://github.com/michaeledgar/protobuf-net/issues/24","id":58233090,"number":24,"title":"GetProto wrong writes string types in default property","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/michaeledgar/protobuf-net/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/michaeledgar/protobuf-net/labels/Component-Persistence","name":"Component-Persistence","color":"ededed"},{"url":"https://api.github.com/repos/michaeledgar/protobuf-net/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/michaeledgar/protobuf-net/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-19T16:40:22Z","updated_at":"2015-02-19T16:40:23Z","closed_at":null,"body":"```\n\nWhat steps will reproduce the problem?\n1.\ndeclare contract\n\t[ProtoContract]\n\tclass MyClass\n\t{\n\t\t[ProtoMember(1), DefaultValue(\"Test Test TEst\")]\n\t\tpublic string TestString;\n\t}\n2.\nget proto desription\nstring proto = Serializer.GetProto<MyClass>();\n\nWhat is the expected output? What do you see instead?\nexpected:\nvariable proto contains\nmessage MyClass {\n   optional string TestString = 1 [default = \"Test Test TEst\"];\n}\nsee instead:\nmessage MyClass {\n   optional string TestString = 1 [default = Test Test TEst];\n}\n\nPlease provide any additional information below.\nI correct this issue with next code:\n\nobject def = prop.DefaultValue;\nif (def != null)\n{\n\tif (prop.DefinedType == \"string\")\n\t{\n\t    def = \"\\\"\" + def.ToString() + \"\\\"\";\n\t}\n\tstring defText = Convert.ToString(def, \nCultureInfo.InvariantCulture);\n\tsb.Append(\" [default = \").Append(defText).Append(\"]\");\n}\n```\n\n-----\nOriginal issue reported on code.google.com by `fghfdjwr...@gmail.com` on 7 Oct 2008 at 11:35"}}