Json Serialization documentation official Unity website - marking it [Serializable] caused error

Hi all, I am trying to read data from a json file. I see the official documentation here covers it: https://docs.unity3d.com/Manual/JSONSerialization.html

but as soon as I add [Serializable] to my code, it chucks up a error. The example in the link above states it should be marked as Serializable:

public class MyClass
    public int level;
    public float timeElapsed;
    public string playerName;

But here is the error I get:

Assets/Scripts/DataReader.cs(5,2): error CS0246: The type or namespace name `Serializable’ could not be found. Are you missing an assembly reference?

It doesnt mention any assembly references in the page. Im hoping the page is wrong lol, my class