SamboyCoding / Tomlet

Zero-Dependency, model-based TOML De/Serializer for .NET
MIT License
155 stars 29 forks source link

Trouble serializing floats using the decimal separator is "," #6

Closed gompocp closed 3 years ago

gompocp commented 3 years ago

Tomlet can (and does) serialize floats using the decimal separator "," used in certain countries. This causes an exception when Tomlet goes back to parse the file

StackTrace

Tomlet.Exceptions.TomlMissingNewlineException: Expecting a newline character at the end of a statement on line 31, but found an unexpected ','
  at Tomlet.TomlParser.Parse (System.String input) [0x000dd] in <747059c1c66a4640ac0f25d6a46dc624>:0
  at Tomlet.TomlParser.ParseFile (System.String filePath) [0x0000c] in <747059c1c66a4640ac0f25d6a46dc624>:0

Generated tomlet file

[VRCModUpdater]
displaytime = 3

[AskToPortalSettings]
enabled = true
autoAcceptFriends = false
autoAcceptWorld = false
autoAcceptHome = false
autoAcceptSelf = true
onlyPortalDrop = false

[CLV]
Enabled = true
LineColorR = 0
LineColorG = 1
LineColorB = 0

[ComfyVRMenu]
EnableComfyVRMenu = true

[Finitizer]
Enabled = true

[JoinNotifier]
BlinkIcon = true
PlaySound = true
ShowJoinedName = true
LeaveBlink = false
LeaveSound = false
ShowLeaveName = false
SoundVolume = 0,300000011920929
UseUiMixer = true
TextSize = 36
NotifyInPublic = true
NotifyInFriends = true
NotifyInPrivate = true
ShowFriendsOnly = true
JoinColor = "127 191 255"
LeaveColor = "153 82 51"
ShowFriendsInDifferentColor = true
FriendJoinColor = "224 224 0"
FriendLeaveColor = "201 201 0"
ShowFriendsAlways = false
HideBlockedUsers = false
SamboyCoding commented 3 years ago

Hopefully addressed in 52a4c62573b83f16c6918f702665ae2d25bdc174 but I cannot get a build out yet.

SamboyCoding commented 3 years ago

Released 1.3.4 with this fix, closing the issue.