ASCII .obj file has the following specification:
v x y z = geometric vertex, X-Coordinate, Y-Coordinate, Z-Coordinate
f 1 2 3 n = face, made up of vertices 1, 2, 3, … n
#Simple Triangle:
v 0.0 0.0 0.0
v 1.0 0.0 0.0
v 1.0 1.0 0.0
f 1 2 3
#Simple Quad:
v 0.0 0.0 0.0
v 1.0 0.0 0.0
v 1.0 1.0 0.0
v 0.0 1.0 0.0
f 1 2 3 4
hence:
#Simple n-gon, n=6:
v 0.0 0.0 0.0
v 1.0 0.0 0.0
v 2.0 1.5 0.0
v 1.0 2.0 0.0
v 0.5 1.0 0.0
v 0.0 1.0 0.0
f 1 2 3 4 5 6
This is ignroing vt (texture vertices) and vn (vertex normals), but that with grouping and materials, p (point) l (line) is the basic wavefront .obj specification.
Of course there are some more things, but that’s basically it.
All you need to do is to make sure to “catch” the geometry for tools unable to use n-gons, or offer both export/import methods.
Because you can save a face as n=8-gon, as 2 quads, or 8 triangles. There’s maybe even something within .obj to differntiate between n-gon, quad and triangle, so to say, store all 3 versions in one .obj and open the one supported. But I don’t know, I am not too familiar with .obj’s specifications.