Skip to content

Dot in key create problem with FlatFile #83

Open
@uiytt

Description

Describe the bug
When there is a dot (.) in the key of a valid json (or any other) file like this :

{
	"test" : {
		"test2.test3": "Should work"
	}
} 

FlatFile#get("test.test2.test3") doesn't return anything.

But

{
	"test" : {
		"test2": {
			"test3" : "It works "
		}
	}
} 

Correctly return "It works"

Expected behavior
When the key of a file contains a dot, it should still work.

Desktop (please complete the following information):

  • SimplixStorage: 3.2.6

Activity

yoyosource

yoyosource commented on Feb 29, 2024

@yoyosource
Collaborator

I have one question regarding this issue. If you have this json object:

{
	"test" : {
		"test2.test3": "Should work",
	        "test2": {
		        "test3" : "It works "
	        }
	}
} 

What should this call FlatFile#get("test.test2.test3") return? It would not be deterministic, since both would match. I think a better idea would be that FlatFile#get("test.test2.test3") return the latter and FlatFile#get("test.test2\.test3") returns the former. This would make more sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Dot in key create problem with FlatFile · Issue #83 · Simplix-Softworks/SimplixStorage