"description": "info1",
"keywords": "creole texas louisiana swamp blues usa",
When the user use the search,i want to find the word inside the “keywords”
the word can be “creole” or “texas” or etc…
What is the best procedure for this?
if i use Lookup(), HasKey() or Value() i get all the words!! The json is about 15.000 lines 3.2mb size
You could use a regular expression and apply it against the keywords element.
static rxWord as new RegEx
rxWord.SearchPattern = "\\b" + myWord + "\\b"
dim keywords as string = j.Lookup( "keywords, "" )
if rxWord.Search( keywords ) isa RegExMatch then
// Found it
end if
However, a little more information on what you’d trying to do might be helpful. Perhaps the JSON should be converted to something else, like a database, or perhaps it should be laid out differently, if you have such control.
The app is for OS X for now and is a radio station list…(find & play)
i prefer to use the sqlite for this, but i don’t want users have access to Station list file…
i have the same file in xml and is the same structure.
<station> station name </station>
<keywords>creole texas louisiana swamp blues usa </keywords>
i have buy your app from apple store “RegExRX” really i like it…
One more thing. If you obscure the password in your code (use a property name that is unrelated to “password” and make it some long, random combination of characters), it will not be impossible to reverse-engineer, but it will still be harder than what you’re doing now. Plus you’ll get the benefit of the SQLite engine.
Split it into many pieces throughout your app
And dont store it in plain text in your app (a long arrays of numbers you munge to get the password maybe)
I’m sure there are a number of things you an do relatively easily to kee pthe casual observer from finding it