rikuson / quiz

Simple flashcards application with command-line interface.
Other
0 stars 0 forks source link

Change quiz file format to JSON #29

Closed rikuson closed 1 year ago

rikuson commented 1 year ago

Considering publishing quiz file as WEB API, JSON is the best way. In addition, it can deal value which includes multiple line and solve https://github.com/rikuson/quiz/issues/6. It will need jq command.

rikuson commented 1 year ago

YAML is more readable for human.

rikuson commented 1 year ago
question: |
  What is the output of this Rust program?

  ```rust
  macro_rules! m {
      ($($s:stmt)*) => {
          $(
              { stringify!($s); 1 }
          )<<*
      };
  }

  fn main() {
      print!(
          "{}{}{}",
          m! { return || true },
          m! { (return) || true },
          m! { {return} || true },
      );
  }

answer: 112