Comments (5)
It means it's omitted like {}
, which is similar to TypeScript's ?
.
from json-kifu-format.
Hmm, that's a good catch. I guess I didn't really pay attention to null
vs undefined
and wrote the jkf player.
So let me update the answer: I intended to be "lacking value", but null
is acceptable if we consider the spec partially consists of jkf player too.
Options for the schema:
- Disallow
null
for thefrom
field and make these files invalid- I want to avoid this to reject possibly generated JKF files for last several years
- Allow
null
along with missing value forfrom
field (and other fields if we find ones), and note that it's a historical reason - Allow
null
for all the fields annotated with?
I'm not sure if which one of second of third is the best
from json-kifu-format.
I see, makes sense. Let's go with the third option
from json-kifu-format.
While fixing draft JSON Schema file (#51 ), following error occured to specification/files/ryuou201409020101.jkf.json
(which is symlinked from test/files/jkf/ryuou201409020101.jkf
for this constraint):
specification/files/ryuou201409020101.jkf.json invalid
[
{
instancePath: '/moves/44/move/from',
schemaPath: '#/$defs/placeFormat/type',
keyword: 'type',
params: { type: 'object' },
message: 'must be object'
}
]
where
$ jq '.moves[44].move.from' specification/files/ryuou201409020101.jkf.json
null
According to your comment above, the existing JKF files (and possibly serializer, since it seems that they are generated automatically) is against the specification, I think.
from json-kifu-format.
In terms of JSON Schema, all options are possible 👍
Based on the current game record files, the third option seems to be a good choice. (Since the both notations has almost same semantics for humans.)
from json-kifu-format.
Related Issues (20)
- パーサのプロジェクトを独立 HOT 1
- package.json HOT 2
- browserify導入 HOT 2
- 手番をbooleanではなくnumberで表現するよう変更する
- KIF形式の0手目コメントの位置
- KIF等でファイル末尾に改行がない場合に対応
- Missing dependency 'vinyl-source-stream' HOT 2
- CSA V2棋譜の読み込み不可 HOT 2
- 読み込めない棋譜スレ HOT 9
- Specify a data model HOT 1
- Support initial state "左七枚落ち", "右七枚落ち" as Kakinoki format HOT 2
- Naming of "打" HOT 1
- Bump Node to 12 or later
- Migrate tslint to eslint
- 指し手 (moves) の要素について HOT 3
- CSA形式: komabetsuline の中身が空だと読み込めない HOT 6
- dropEffectフィールドについて HOT 1
- ILLEGAL_ACTIONの扱いが先後逆の表記になっている
- CSA一括表現の後の `00AL` HOT 2
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 json-kifu-format.