Subversion Repository Public Repository

Nextrek

Diff Revisions 57 vs 58 for /minstrek/GameEditorBKP - Copia/GameEditor/Estensioni.vb

Diff revisions: vs.
  @@ -2,11 +2,11 @@
2 2
3 3 Module Estensioni
4 4
5 - <Extension()> Public Function ToJSON(Of T As Class)(ByVal obj As T) As String 'Where( T : Class)
5 + <Extension()> Public Function ToJSON(Of T As Class)(ByVal obj As T) As String
6 6 Dim serializer As System.Runtime.Serialization.Json.DataContractJsonSerializer = New System.Runtime.Serialization.Json.DataContractJsonSerializer(obj.GetType())
7 7 Using stream As System.IO.MemoryStream = New System.IO.MemoryStream()
8 8 serializer.WriteObject(stream, obj)
9 - Return System.Text.Encoding.Default.GetString(stream.ToArray())
9 + Return (System.Text.Encoding.UTF8.GetString(stream.ToArray))
10 10 End Using
11 11 End Function
12 12