Allow more primitives (boolean/number/string)
See original GitHub issueE.g. in ImageObject
:
-
isAccessibleForFree
should be allowed to be aboolean
primitive -
width
andheight
should be allowed to be anumber
primitive -
author
andcontentLocation
should be allowed to be astring
primitive
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
Primitive Data Types (The Java™ Tutorials > Learning the ...
boolean : The boolean data type has only two possible values: true and false . Use this data type for simple flags that...
Read more >JavaScript data types and data structures - MDN Web Docs
Primitive values · Null type · Undefined type · Boolean type · Number type · BigInt type · String type · Symbol type....
Read more >Default value of 'boolean' and 'Boolean' in Java - Stack Overflow
Boolean must be constructed with a boolean or a String . If the object is unintialized, it would point to null . The...
Read more >Handbook - Basic Types - TypeScript
Tuple types allow you to express an array with a fixed number of elements whose ... non-primitive type, i.e. anything that is not...
Read more >Methods of primitives - The Modern JavaScript Tutorial
The “object wrappers” are different for each primitive type and are called: String , Number , Boolean , Symbol and BigInt . Thus,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For Booleans, to save backwards compatibility, a good shape would be:
So you can use:
Boolean.True
,Boolean.False
, as well astrue
andfalse
.Hm. Note that ImageObject doesn’t always work as a string, for example:
https://lists.w3.org/Archives/Public/public-schemaorg/2019Nov/0003.html
Structured Data Testing Tool rejects when “logo” is set to a string, requiring an ImageObject set explicitly.