Comments (3)
Hi,
Thanks for your feedback.
See, empty values are valid as in {"k":""}
.
Also, empty keys are valid like this: {"":"v"}
.
See JSON Lint as reference.
Regards,
Marcelo.
from mcjson.
Thanks you for your quick response. I know that empty strings are valid as keys or values but, what I was trying to say is that, if you pass an empty string to validate ( i.e. check('')
) it returns true
and it should return false
, just like JSON Lint does if you simply click on the [Validate JSON] button without any text in the textarea.
Best regards.
from mcjson.
Oh, Now I got it.
It is simple to implement.
Meanwhile, you can check strings that are not empty, right? :-)
I'll share it in next update.
Best.
from mcjson.
Related Issues (20)
- When value is a json string, tostring does not handle escaping HOT 5
- Range check error HOT 9
- PrjTestMcJSON - many exception HOT 5
- Shorteners self-test result HOT 7
- Test #13 failed in Main branch (trunk rev. #94) HOT 4
- Invalid char at pos 1 (UTF8 BOM support) HOT 6
- Excepted got "/" (Comment support) HOT 11
- Unknown escape at pos (escpaing support) HOT 15
- McJsonEscapeString (overzealous) HOT 17
- Slow json generation speed HOT 5
- MCJsonUnEscapeString "/" and "\" missing after unescape HOT 3
- HasKey exception HOT 11
- New empty key destroys the json structure HOT 10
- Check function does not return the wrong position HOT 7
- Check function speed problem HOT 10
- Slower shortener operation (but I realized this is normal because of the AddOrSet search) HOT 7
- McJSONEscapeString TAB problem HOT 3
- How check path exist by not throw error HOT 9
- How fix warning compiler about string HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcjson.