Unable to import .json file from Mem

Similar to this and this, I can’t import my notes from Mem in .json format.

  1. Export from mem. Result: .json file of 4.3mb with all my notes.
  2. Use import dialogue in Logseq. Select .json file from PC
  3. Instantly receive ‘import finished’ message

No new pages created or anything else.

Sample .json file in next message (not too much personal info).

[
  {
    "id": "jMemhSFliHpW03RiVCgo",
    "title": "My week",
    "markdown": "My week\n- Psych safety for DLR \n- review contract adjustments\n- Status update to Leon\n- Prep project plan\n- draft review version of workshop 1 - **DUE BY Wed, July 26th**\n- Get paid what you're worth workshop\n- review plan, refine\n- Get a job in July\n- new lamp list\n- review 2HJS, maybe podcasts\n- resume + materials: Once contract signed, add MMC Consulting\n- GA - 2HJS class - August 9th **2.5 weeks away**\n- First draft next week- \n- this is an opt in program for people interested in these things\n- learning to consistently follow a plan\n- Learning to reach out to new people - essential for careers in general\n- developing a target companies list which comes in handy in a bunch of ways \n- changing their sense of what matters - # of applications doesn't correlate to job search success: # of informational meetings does\n\n\nGA\n- [x] morning meeting\n- [x] lesson plan & GC setup for 5/23\n- [x] homework review \n- [ ] homework review 4/23\n- [x] comms for all\n- [x] emails for quiet newbs\n- [x] office hours\n",
    "tags": [],
    "created": "2023-07-17T17:56:24.278Z",
    "updated": "2024-04-25T03:38:50.386Z"
  },
  {
    "id": "coMy2QPa4ZhR6DLtQX06",
    "title": "Interviewing industry badasses",
    "markdown": "Interviewing industry badasses\n\n\n\n- [x] Create simple blog page on [Mick's tome site - for coaching and referral](https://mem.ai/m/oaQVYBh7E9pxAVDsNQRg)\n\n- [ ] Write up [Patrick Mullarck](https://mem.ai/m/zoAjg1ivcFlkVhR8oSkh)\n interview for blog\n",
    "tags": [
      "projects"
    ],
    "created": "2023-04-26T23:15:10.352Z",
    "updated": "2024-04-25T03:38:49.287Z"
  },
  {
    "id": "rAaNmQxiM86xbAUFQjj6",
    "title": "How to share and collaborate",
    "markdown": "# How to share and collaborate\n\n\nSharing and collaborating on work in Mem is easy and seamless, whether or not your collaborators have a pre-existing Mem account. You can also publish mems to a public URL, meaning that anyone with the link to the mem can view it online.\n### Sharing a mem\n\n**With an individual:**\n\nTo share a mem with someone (with or without a Mem account), you can do one of two things. Either:\n- Type **@** followed by the individual's first name and last name (**@FirstName LastName**). If they have a Mem account already, you'll be able to select their name from the pop-up that appears on screen. If they don't, select **Invite FirstName LastName** within the pop-up and then enter their email address on the following screen to invite them to view/edit the mem you're sharing.\n\n![](upload://h9ulAAB946m7x9kkKfQmwhKs08q.png)\n\n- Click on the blue **Share **button at the top of the screen, and start typing the name or email address of the person you want to share the mem with in the search field.\n\n![](upload://cvWwHFyZlpLh4MuQo1DdQZWpA7p.png)\n\n\n\n\n**With a group:**\nTo share a mem with multiple people, select **Groups** in the left-hand sidebar and either select a pre-existing group or select **Create new group **in the top right-hand corner. Choose a name for the group, and then add the individuals you want to it. You'll then be able to share any mem with every person in that group simultaneously by typing **@GroupName** into the relevant mem.\n\n**To a public URL:**\nTo publish a mem to a public URL that anyone can view, click on the blue **Share **status icon at the top of the editor and then select **Publish**. You will then receive a public link that you can copy and share with others. Individuals with this link will be able to view the mem in publishing mode, but will not be able to edit it.\n\n### Adding comments\n\nYou can add comments to shared or private mems by selecting a portion of text and pressing **⌘⇧M**, or by clicking on the gray **lightning bolt** icon that appears in the right-hand margin next to text you are currently editing, and selecting **Comment**. Once you have written your comment, you can either select **Post as comment**, allowing everyone shared in the mem to see it, or **Keep private** if you do not want others shared in the mem to be able to view it.\n",
    "tags": [
      "tutorials"
    ],
    "created": "2023-01-20T04:31:27.720Z",
    "updated": "2023-01-20T04:31:27.720Z"
  }
]

Nothing? No one?

Admins, any thoughts?

Alternatives to the import dialogue?

  • JSON is a format:
    • very common
    • but very generic
      • It doesn’t specify any particular structure.
      • It is not possible for any application to understand JSON of unrecognized structure.
  • Apparently Logseq supports importing JSON only when structured according to the JSON export of either:
    • Roam
    • Logseq itself
  • If you create a small test graph in Logseq and export it as JSON, you will see how it differs in its structure from your file.
    • Which may mean that Logseq skips unrecognized structure in your file and thus it finishes immediately, without finding anything recognizable to import.
  • For the import to succeed, should process the JSON to make it compatible to what Logseq recognizes. Here are some options:
    • Write a (small) script to read the JSON and use Logseq’s API to add the notes.
      • For example, Amplenote reads Mem JSON like this.
    • Use an intermediate application:
      • import your notes to an application that supports both Mem and Logseq
        • Support may be through plugins.
      • export from there to a format recognized by Logseq
        • most probably (and preferably) markdown
      • import to Logseq

Brilliant reply, thank you.

I’m actually able to export a single huge .md file (markdown) from Mem.

But when I import it using the import dialogue in Logseq, I get an error b/c it’s not a json file.

The dialogue states that markdown is supported, but I get the error nonetheless.

Any help with that will be welcome. I know Logseq supports ‘importing’ multiple individual .md files by just adding them to the file structure, but this is one huge .md file.

I will also explore intermediate options as you shared, and report back. Thanks again!

  • A markdown file of around 5MB shouldn’t be a problem.
  • Could still break it into a few smaller ones.
    • Could do it either:
      • with a script
      • manually
        • All you need is a good editor.
    • Could decide based on the created/updated date about both:
      • the breaking points
      • the names of the files
    • If it wasn’t for the privacy issue, many people could do it for you in minutes.
  • When you have the markdown file(s):
    • don’t try to import through the user interface
    • just add the file(s):
      • to folder journals, If they are given proper date names
      • to folder pages otherwise